aboutsummaryrefslogtreecommitdiff
path: root/mparser.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-03-02 01:15:13 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-03-02 01:15:13 +0200
commitadd94f96edbf09e8a7a151e1cd901692d55e71f6 (patch)
tree3ce3e0d7153a0e9f56062ac9012ff238cf37a403 /mparser.py
parenta7ce2fb68d4f72040e87d7f04c09b684ee0f66df (diff)
downloadmeson-add94f96edbf09e8a7a151e1cd901692d55e71f6.zip
meson-add94f96edbf09e8a7a151e1cd901692d55e71f6.tar.gz
meson-add94f96edbf09e8a7a151e1cd901692d55e71f6.tar.bz2
No longer require backslash for line continuation inside an argument list.
Diffstat (limited to 'mparser.py')
-rw-r--r--mparser.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/mparser.py b/mparser.py
index 499381f..aae07d8 100644
--- a/mparser.py
+++ b/mparser.py
@@ -166,14 +166,24 @@ def p_statement_expression(t):
def p_args_multiple(t):
- 'args : statement COMMA args'
- args = t[3]
+ '''args : statement COMMA args
+ | statement COMMA EOL args
+ | statement EOL COMMA args'''
+ if len(t) == 5:
+ args = t[4]
+ else:
+ args = t[3]
args.prepend(t[1])
t[0] = args
def p_kwargs_multiple(t):
- 'args : expression COLON statement COMMA args'
- args = t[5]
+ '''args : expression COLON statement COMMA args
+ | expression COLON statement COMMA EOL args
+ | expression COLON statement EOL COMMA args'''
+ if len(t) == 7:
+ args = t[6]
+ else:
+ args = t[5]
args.set_kwarg(t[1], t[3])
t[0] = args