Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Side by Side Diff: Parser/Python.asdl

Issue 15550: Trailing white spaces
Patch Set: Created 7 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Objects/lnotab_notes.txt ('k') | PC/bdist_wininst/install.rc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 -- ASDL's five builtin types are identifier, int, string, bytes, object 1 -- ASDL's five builtin types are identifier, int, string, bytes, object
2 2
3 module Python 3 module Python
4 { 4 {
5 mod = Module(stmt* body) 5 mod = Module(stmt* body)
6 | Interactive(stmt* body) 6 | Interactive(stmt* body)
7 | Expression(expr body) 7 | Expression(expr body)
8 8
9 -- not really an actual node but useful in Jython's typesystem. 9 -- not really an actual node but useful in Jython's typesystem.
10 | Suite(stmt* body) 10 | Suite(stmt* body)
11 11
12 stmt = FunctionDef(identifier name, arguments args, 12 stmt = FunctionDef(identifier name, arguments args,
13 stmt* body, expr* decorator_list, expr? returns) 13 stmt* body, expr* decorator_list, expr? returns)
14 | ClassDef(identifier name, 14 | ClassDef(identifier name,
15 expr* bases, 15 expr* bases,
16 keyword* keywords, 16 keyword* keywords,
17 expr? starargs, 17 expr? starargs,
18 expr? kwargs, 18 expr? kwargs,
19 stmt* body, 19 stmt* body,
20 expr* decorator_list) 20 expr* decorator_list)
21 | Return(expr? value) 21 | Return(expr? value)
22 22
23 | Delete(expr* targets) 23 | Delete(expr* targets)
24 | Assign(expr* targets, expr value) 24 | Assign(expr* targets, expr value)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 | Str(string s) -- need to specify raw, unicode, etc? 70 | Str(string s) -- need to specify raw, unicode, etc?
71 | Bytes(bytes s) 71 | Bytes(bytes s)
72 | Ellipsis 72 | Ellipsis
73 -- other literals? bools? 73 -- other literals? bools?
74 74
75 -- the following expression can appear in assignment context 75 -- the following expression can appear in assignment context
76 | Attribute(expr value, identifier attr, expr_context ctx) 76 | Attribute(expr value, identifier attr, expr_context ctx)
77 | Subscript(expr value, slice slice, expr_context ctx) 77 | Subscript(expr value, slice slice, expr_context ctx)
78 | Starred(expr value, expr_context ctx) 78 | Starred(expr value, expr_context ctx)
79 | Name(identifier id, expr_context ctx) 79 | Name(identifier id, expr_context ctx)
80 | List(expr* elts, expr_context ctx) 80 | List(expr* elts, expr_context ctx)
81 | Tuple(expr* elts, expr_context ctx) 81 | Tuple(expr* elts, expr_context ctx)
82 82
83 -- col_offset is the byte offset in the utf8 string the parser uses 83 -- col_offset is the byte offset in the utf8 string the parser uses
84 attributes (int lineno, int col_offset) 84 attributes (int lineno, int col_offset)
85 85
86 expr_context = Load | Store | Del | AugLoad | AugStore | Param 86 expr_context = Load | Store | Del | AugLoad | AugStore | Param
87 87
88 slice = Slice(expr? lower, expr? upper, expr? step) 88 slice = Slice(expr? lower, expr? upper, expr? step)
89 | ExtSlice(slice* dims) 89 | ExtSlice(slice* dims)
90 | Index(expr value) 90 | Index(expr value)
91 91
92 boolop = And | Or 92 boolop = And | Or
93 93
94 operator = Add | Sub | Mult | Div | Mod | Pow | LShift 94 operator = Add | Sub | Mult | Div | Mod | Pow | LShift
95 | RShift | BitOr | BitXor | BitAnd | FloorDiv 95 | RShift | BitOr | BitXor | BitAnd | FloorDiv
96 96
97 unaryop = Invert | Not | UAdd | USub 97 unaryop = Invert | Not | UAdd | USub
98 98
99 cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn 99 cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn
100 100
101 comprehension = (expr target, expr iter, expr* ifs) 101 comprehension = (expr target, expr iter, expr* ifs)
102 102
103 excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body) 103 excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)
104 attributes (int lineno, int col_offset) 104 attributes (int lineno, int col_offset)
105 105
106 arguments = (arg* args, identifier? vararg, expr? varargannotation, 106 arguments = (arg* args, identifier? vararg, expr? varargannotation,
107 arg* kwonlyargs, identifier? kwarg, 107 arg* kwonlyargs, identifier? kwarg,
108 expr? kwargannotation, expr* defaults, 108 expr? kwargannotation, expr* defaults,
109 expr* kw_defaults) 109 expr* kw_defaults)
110 arg = (identifier arg, expr? annotation) 110 arg = (identifier arg, expr? annotation)
111 111
112 -- keyword arguments supplied to call 112 -- keyword arguments supplied to call
113 keyword = (identifier arg, expr value) 113 keyword = (identifier arg, expr value)
114 114
115 -- import name with optional 'as' alias. 115 -- import name with optional 'as' alias.
116 alias = (identifier name, identifier? asname) 116 alias = (identifier name, identifier? asname)
117 117
118 withitem = (expr context_expr, expr? optional_vars) 118 withitem = (expr context_expr, expr? optional_vars)
119 } 119 }
120 120
OLDNEW
« no previous file with comments | « Objects/lnotab_notes.txt ('k') | PC/bdist_wininst/install.rc » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+