将 ast 英化
This commit is contained in:
1 parent
752f3ddb70
commit
c5570dc8b1
9 files changed
+424
-413
No files matched your search
+29
-29
@@ -11,7 +11,7 @@ from .base import (
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Name 节点
|
||||
# Name node
|
||||
# ============================================================
|
||||
|
||||
class Name(AST):
|
||||
@@ -54,7 +54,7 @@ class Name(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Constant 节点(用 const_kind 标识子类型)
|
||||
# Constant nodes (subtype marked by const_kind)
|
||||
# ============================================================
|
||||
|
||||
class Constant(AST):
|
||||
@@ -107,7 +107,7 @@ class Constant(AST):
|
||||
pos = _emit(buf, size, pos, "(null)")
|
||||
pos = _emit(buf, size, pos, "'")
|
||||
elif self.const_kind == CONST_CHAR:
|
||||
# 单引号单字符 → 显示为字符 ASCII 值
|
||||
# Single character → display as character ASCII value
|
||||
pos = _emit(buf, size, pos, "char(")
|
||||
pos = _emit_int(buf, size, pos, self.int_val)
|
||||
pos = _emit(buf, size, pos, ")")
|
||||
@@ -123,7 +123,7 @@ class Constant(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# BinOp 节点
|
||||
# BinOp Node
|
||||
# ============================================================
|
||||
|
||||
class BinOp(AST):
|
||||
@@ -171,7 +171,7 @@ class BinOp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# UnaryOp 节点
|
||||
# UnaryOp Node
|
||||
# ============================================================
|
||||
|
||||
class UnaryOp(AST):
|
||||
@@ -212,7 +212,7 @@ class UnaryOp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Compare 节点
|
||||
# Compare Node
|
||||
# ============================================================
|
||||
|
||||
class Compare(AST):
|
||||
@@ -262,7 +262,7 @@ class Compare(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Call 节点
|
||||
# Call Node
|
||||
# ============================================================
|
||||
|
||||
class Call(AST):
|
||||
@@ -311,7 +311,7 @@ class Call(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# BoolOp 节点
|
||||
# BoolOp Node
|
||||
# ============================================================
|
||||
|
||||
class BoolOp(AST):
|
||||
@@ -352,7 +352,7 @@ class BoolOp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Lambda 节点
|
||||
# Lambda Node
|
||||
# ============================================================
|
||||
|
||||
class Lambda(AST):
|
||||
@@ -396,7 +396,7 @@ class Lambda(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# IfExp 节点
|
||||
# IfExp Node
|
||||
# ============================================================
|
||||
|
||||
class IfExp(AST):
|
||||
@@ -449,7 +449,7 @@ class IfExp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Dict 节点
|
||||
# Dict Node
|
||||
# ============================================================
|
||||
|
||||
class Dict(AST):
|
||||
@@ -491,7 +491,7 @@ class Dict(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Set 节点
|
||||
# Set Node
|
||||
# ============================================================
|
||||
|
||||
class Set(AST):
|
||||
@@ -526,7 +526,7 @@ class Set(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# ListComp 节点
|
||||
# ListComp Node
|
||||
# ============================================================
|
||||
|
||||
class ListComp(AST):
|
||||
@@ -570,7 +570,7 @@ class ListComp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# SetComp 节点
|
||||
# SetComp Node
|
||||
# ============================================================
|
||||
|
||||
class SetComp(AST):
|
||||
@@ -614,7 +614,7 @@ class SetComp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# DictComp 节点
|
||||
# DictComp Node
|
||||
# ============================================================
|
||||
|
||||
class DictComp(AST):
|
||||
@@ -665,7 +665,7 @@ class DictComp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# GeneratorExp 节点
|
||||
# GeneratorExp Node
|
||||
# ============================================================
|
||||
|
||||
class GeneratorExp(AST):
|
||||
@@ -709,7 +709,7 @@ class GeneratorExp(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Await 节点
|
||||
# Await Node
|
||||
# ============================================================
|
||||
|
||||
class Await(AST):
|
||||
@@ -744,7 +744,7 @@ class Await(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Yield 节点
|
||||
# Yield Node
|
||||
# ============================================================
|
||||
|
||||
class Yield(AST):
|
||||
@@ -779,7 +779,7 @@ class Yield(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# YieldFrom 节点
|
||||
# YieldFrom Node
|
||||
# ============================================================
|
||||
|
||||
class YieldFrom(AST):
|
||||
@@ -814,7 +814,7 @@ class YieldFrom(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# FormattedValue 节点
|
||||
# FormattedValue Node
|
||||
# ============================================================
|
||||
|
||||
class FormattedValue(AST):
|
||||
@@ -864,7 +864,7 @@ class FormattedValue(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# JoinedStr 节点
|
||||
# JoinedStr Node
|
||||
# ============================================================
|
||||
|
||||
class JoinedStr(AST):
|
||||
@@ -899,7 +899,7 @@ class JoinedStr(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Attribute 节点
|
||||
# Attribute Node
|
||||
# ============================================================
|
||||
|
||||
class Attribute(AST):
|
||||
@@ -944,7 +944,7 @@ class Attribute(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Subscript 节点
|
||||
# Subscript Node
|
||||
# ============================================================
|
||||
|
||||
class Subscript(AST):
|
||||
@@ -992,7 +992,7 @@ class Subscript(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Starred 节点
|
||||
# Starred Node
|
||||
# ============================================================
|
||||
|
||||
class Starred(AST):
|
||||
@@ -1033,7 +1033,7 @@ class Starred(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# List 节点
|
||||
# List Node
|
||||
# ============================================================
|
||||
|
||||
class List(AST):
|
||||
@@ -1072,7 +1072,7 @@ class List(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Tuple 节点
|
||||
# Tuple Node
|
||||
# ============================================================
|
||||
|
||||
class Tuple(AST):
|
||||
@@ -1111,7 +1111,7 @@ class Tuple(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# Slice 节点
|
||||
# Slice Node
|
||||
# ============================================================
|
||||
|
||||
class Slice(AST):
|
||||
@@ -1164,7 +1164,7 @@ class Slice(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# NamedExpr 节点
|
||||
# NamedExpr Node
|
||||
# ============================================================
|
||||
|
||||
class NamedExpr(AST):
|
||||
@@ -1208,7 +1208,7 @@ class NamedExpr(AST):
|
||||
|
||||
|
||||
# ============================================================
|
||||
# OpNode 节点
|
||||
# OpNode Node
|
||||
# ============================================================
|
||||
|
||||
class OpNode(AST):
|
||||
|
||||
Reference in new issue
Block a user