diff options
Diffstat (limited to 'mparser.py')
-rw-r--r-- | mparser.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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' |