diff options
Diffstat (limited to 'Tools/compiler/ast.txt')
-rw-r--r-- | Tools/compiler/ast.txt | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Tools/compiler/ast.txt b/Tools/compiler/ast.txt new file mode 100644 index 0000000..1ca13f2 --- /dev/null +++ b/Tools/compiler/ast.txt @@ -0,0 +1,77 @@ +Module: doc, node +Stmt: nodes +Function: name, argnames, defaults, flags, doc, code +Lambda: argnames, defaults, flags, code +Class: name, bases, doc, code +Pass: +Break: +Continue: +For: assign, list, body, else_ +While: test, body, else_ +If: tests, else_ +Exec: expr, locals, globals +From: modname, names +Import: names +Raise: expr1, expr2, expr3 +TryFinally: body, final +TryExcept: body, handlers, else_ +Return: value +Const: value +Print: nodes, dest +Printnl: nodes, dest +Discard: expr +AugAssign: node, op, expr +Assign: nodes, expr +AssTuple: nodes +AssList: nodes +AssName: name, flags +AssAttr: expr, attrname, flags +ListComp: expr, quals +ListCompFor: assign, list, ifs +ListCompIf: test +List: nodes +Dict: items +Not: expr +Compare: expr, ops +Name: name +Global: names +Backquote: expr +Getattr: expr, attrname +CallFunc: node, args, star_args = None, dstar_args = None +Keyword: name, expr +Subscript: expr, flags, subs +Ellipsis: +Sliceobj: nodes +Slice: expr, flags, lower, upper +Assert: test, fail +Tuple: nodes +Or: nodes +And: nodes +Bitor: nodes +Bitxor: nodes +Bitand: nodes +LeftShift: (left, right) +RightShift: (left, right) +Add: (left, right) +Sub: (left, right) +Mul: (left, right) +Div: (left, right) +Mod: (left, right) +Power: (left, right) +UnaryAdd: expr +UnarySub: expr +Invert: expr + +init(Function): + self.varargs = self.kwargs = None + if flags & CO_VARARGS: + self.varargs = 1 + if flags & CO_VARKEYWORDS: + self.kwargs = 1 + +init(Lambda): + self.varargs = self.kwargs = None + if flags & CO_VARARGS: + self.varargs = 1 + if flags & CO_VARKEYWORDS: + self.kwargs = 1 |