diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-03-02 01:15:13 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-03-02 01:15:13 +0200 |
commit | add94f96edbf09e8a7a151e1cd901692d55e71f6 (patch) | |
tree | 3ce3e0d7153a0e9f56062ac9012ff238cf37a403 /mparser.py | |
parent | a7ce2fb68d4f72040e87d7f04c09b684ee0f66df (diff) | |
download | meson-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.py | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -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 |