🐐 Arrays with newlines
This commit is contained in:
+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