aboutsummaryrefslogtreecommitdiff
path: root/mparser.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-03-10 01:16:57 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-03-10 01:16:57 +0200
commitf45645388363372f77e0d63523383e07dcdacd82 (patch)
tree74cd06846a3a2ff67f72e3aa21c62d8e556bad90 /mparser.py
parent705bd4b5295272db678a31a06e70b97dc345d03d (diff)
downloadmeson-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.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'