🐐 Arrays with newlines
This commit is contained in:
1 parent
60b45869fb
commit
634c5a2f93
2 files changed
+32
-2
No files matched your search
+2
-2
@@ -273,14 +273,14 @@ class Parser():
|
||||
|
||||
@self.pg.production('array_items : ')
|
||||
@self.pg.production('array_items : expression')
|
||||
@self.pg.production('array_items : expression SYMBOL_COMMA array_items')
|
||||
@self.pg.production('array_items : expression SYMBOL_COMMA opt_newline array_items')
|
||||
def array_items(calls):
|
||||
if len(calls) == 0:
|
||||
return []
|
||||
elif len(calls) == 1:
|
||||
return [calls[0]]
|
||||
else:
|
||||
return [calls[0]] + calls[2]
|
||||
return [calls[0]] + calls[3]
|
||||
|
||||
@self.pg.production('expression : id')
|
||||
def expression_id(tokens):
|
||||
|
||||
Reference in new issue
Block a user