aboutsummaryrefslogtreecommitdiff
path: root/mparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'mparser.py')
-rw-r--r--mparser.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/mparser.py b/mparser.py
index 87782b2..75ab035 100644
--- a/mparser.py
+++ b/mparser.py
@@ -137,8 +137,16 @@ def p_statement_comparison(t):
t[0] = nodes.Comparison(t[1], t[2], t[3], t[1].lineno())
def p_statement_array(t):
- '''statement : LBRACKET args RBRACKET'''
- t[0] = nodes.ArrayStatement(t[2], t.lineno(1))
+ '''statement : LBRACKET args RBRACKET
+ | LBRACKET EOL args RBRACKET'''
+ if len(t) == 4:
+ t[0] = nodes.ArrayStatement(t[2], t.lineno(1))
+ else:
+ t[0] = nodes.ArrayStatement(t[3], t.lineno(1))
+
+def p_statement_array2(t):
+ '''statement : LBRACKET args EOL RBRACKET
+ | LBRACKET EOL args EOL RBRACKET'''
def p_statement_func_call(t):
'statement : expression LPAREN args RPAREN'