相关文章推荐
不拘小节的牛腩  ·  欢迎访问PinPong ...·  1 周前    · 

原始碼: Lib/token.py

该模块提供了一些代表解析树的叶子节点的数字值的常量(终端形符)。 请参阅 Python 发布版中的 Grammar/Tokens 文件获取在该语言语法情境下的名称定义。 这些名称所映射的特定数字值有可能在各 Python 版本间发生变化。

该模块还提供从数字代码到名称和一些函数的映射。 这些函数镜像了 Python C 头文件中的定义。

token. tok_name

将此模块中定义的常量的数值映射回名称字符串的字典,允许生成更加人类可读的解析树表示。

© 版權 2001-2023, Python Software Foundation. This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License. See History and License for more information.
The Python Software Foundation is a non-profit corporation. Please donate. 最後更新於 9月 12, 2023。 Found a bug ?