@@ -1492,31 +1492,33 @@ msgstr "显示帮助信息并退出。"
14921492msgid ""
14931493"Specify what kind of code must be compiled, like the *mode* argument in "
14941494":func:`parse`."
1495- msgstr ""
1495+ msgstr "指明哪种代码必须被编译,相当于 :func:`parse` 中的 *mode* 参数。 "
14961496
14971497#: ../../library/ast.rst:2215
14981498msgid "Don't parse type comments."
1499- msgstr ""
1499+ msgstr "不要解析类型注释。 "
15001500
15011501#: ../../library/ast.rst:2219
15021502msgid "Include attributes such as line numbers and column offsets."
1503- msgstr ""
1503+ msgstr "包括属性如行号和列偏移。 "
15041504
15051505#: ../../library/ast.rst:2224
15061506msgid "Indentation of nodes in AST (number of spaces)."
1507- msgstr ""
1507+ msgstr "AST 中节点的缩进(空格数)。 "
15081508
15091509#: ../../library/ast.rst:2226
15101510msgid ""
15111511"If :file:`infile` is specified its contents are parsed to AST and dumped to "
15121512"stdout. Otherwise, the content is read from stdin."
1513- msgstr ""
1513+ msgstr "如果指定了 :file:`infile` 则其内容将被解析为 AST 并转储至 stdout。 在其他情况下,将从 stdin 读取内容。 "
15141514
15151515#: ../../library/ast.rst:2232
15161516msgid ""
15171517"`Green Tree Snakes <https://greentreesnakes.readthedocs.io/>`_, an external "
15181518"documentation resource, has good details on working with Python ASTs."
15191519msgstr ""
1520+ "`Green Tree Snakes <https://greentreesnakes.readthedocs.io/>`_,一个外部文档资源,包含处理"
1521+ " Python AST 的完整细节。"
15201522
15211523#: ../../library/ast.rst:2235
15221524msgid ""
@@ -1525,13 +1527,17 @@ msgid ""
15251527"code that generated them. This is helpful for tools that make source code "
15261528"transformations."
15271529msgstr ""
1530+ "`ASTTokens <https://asttokens.readthedocs.io/en/latest/user-guide.html>`_ 会为"
1531+ " Python AST 标注生成它们的源代码中的形符和文本的位置。 这对执行源代码转换的工具很有帮助。"
15281532
15291533#: ../../library/ast.rst:2240
15301534msgid ""
15311535"`leoAst.py <http://leoeditor.com/appendices.html#leoast-py>`_ unifies the "
15321536"token-based and parse-tree-based views of python programs by inserting two-"
15331537"way links between tokens and ast nodes."
15341538msgstr ""
1539+ "`leoAst.py <http://leoeditor.com/appendices.html#leoast-py>`_ 通过在形符和 ast "
1540+ "节点之间插入双向链接统一了 Python 程序基于形符的和基于解析树的视图。"
15351541
15361542#: ../../library/ast.rst:2244
15371543msgid ""
@@ -1540,6 +1546,8 @@ msgid ""
15401546"useful for building automated refactoring (codemod) applications and "
15411547"linters."
15421548msgstr ""
1549+ "`LibCST <https://libcst.readthedocs.io/>`_ 将代码解析为一个实体语法树(Concrete Syntax "
1550+ "Tree),它看起来像是 ast 树而又保留了所有格式化细节。 它对构建自动化重构(codemod)应用和代码质量检查工具很有用处。"
15431551
15441552#: ../../library/ast.rst:2249
15451553msgid ""
0 commit comments