diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-03-10 01:16:57 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-03-10 01:16:57 +0200 |
commit | f45645388363372f77e0d63523383e07dcdacd82 (patch) | |
tree | 74cd06846a3a2ff67f72e3aa21c62d8e556bad90 /mparser.py | |
parent | 705bd4b5295272db678a31a06e70b97dc345d03d (diff) | |
download | meson-f45645388363372f77e0d63523383e07dcdacd82.zip meson-f45645388363372f77e0d63523383e07dcdacd82.tar.gz meson-f45645388363372f77e0d63523383e07dcdacd82.tar.bz2 |
Handle more eols in array construction.
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' |