Changes due to added test for fileConfig contributed by Shane Hathaway.
[python.git] / Tools / compiler / ast.txt
blobf2c0c999f5e106c4d061d00225dea93b756a2829
1 # This file describes the nodes of the AST in ast.py.  The module is
2 # generated by astgen.py.  
3 # The descriptions use the following special notation to describe
4 # properties of the children:
5 #    *   this child is not a node
6 #    !   this child is a sequence that contains nodes in it
7 #    &   this child may be set to None
8 #  = ... a default value for the node constructor (optional args)
10 # If you add node types here, please be sure to update the list of 
11 # Node types in Doc/lib/asttable.tex.
12 Module: doc*, node
13 Stmt: nodes!
14 Decorators: nodes!
15 Function: decorators&, name*, argnames*, defaults!, flags*, doc*, code
16 Lambda: argnames*, defaults!, flags*, code
17 Class: name*, bases!, doc*, code
18 Pass: 
19 Break: 
20 Continue: 
21 For: assign, list, body, else_&
22 While: test, body, else_&
23 If: tests!, else_&
24 Exec: expr, locals&, globals&
25 From: modname*, names*
26 Import: names*
27 Raise: expr1&, expr2&, expr3&
28 TryFinally: body, final
29 TryExcept: body, handlers!, else_&
30 Return: value
31 Yield: value
32 Const: value*
33 Print: nodes!, dest&
34 Printnl: nodes!, dest&
35 Discard: expr
36 AugAssign: node, op*, expr
37 Assign: nodes!, expr
38 AssTuple: nodes!
39 AssList: nodes!
40 AssName: name*, flags*
41 AssAttr: expr, attrname*, flags*
42 ListComp: expr, quals!
43 ListCompFor: assign, list, ifs!
44 ListCompIf: test
45 GenExpr: code 
46 GenExprInner: expr, quals!
47 GenExprFor: assign, iter, ifs!
48 GenExprIf: test
49 List: nodes!
50 Dict: items!
51 Not: expr
52 Compare: expr, ops!
53 Name: name*
54 Global: names*
55 Backquote: expr
56 Getattr: expr, attrname*
57 CallFunc: node, args!, star_args& = None, dstar_args& = None
58 Keyword: name*, expr
59 Subscript: expr, flags*, subs!
60 Ellipsis: 
61 Sliceobj: nodes!
62 Slice: expr, flags*, lower&, upper&
63 Assert: test, fail&
64 Tuple: nodes!
65 Or: nodes!
66 And: nodes!
67 Bitor: nodes!
68 Bitxor: nodes!
69 Bitand: nodes!
70 LeftShift: (left, right)
71 RightShift: (left, right)
72 Add: (left, right)
73 Sub: (left, right)
74 Mul: (left, right)
75 Div: (left, right)
76 Mod: (left, right)
77 Power: (left, right)
78 FloorDiv: (left, right)
79 UnaryAdd: expr
80 UnarySub: expr
81 Invert: expr
83 init(Function):
84     self.varargs = self.kwargs = None
85     if flags & CO_VARARGS:
86         self.varargs = 1
87     if flags & CO_VARKEYWORDS:
88         self.kwargs = 1
90 init(Lambda):
91     self.varargs = self.kwargs = None
92     if flags & CO_VARARGS:
93         self.varargs = 1
94     if flags & CO_VARKEYWORDS:
95         self.kwargs = 1
97 init(GenExpr):
98     self.argnames = ['[outmost-iterable]']
99     self.varargs = self.kwargs = None
101 init(GenExprFor):
102     self.is_outmost = False