diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-07-27 17:55:17 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-07-27 17:55:17 +0300 |
| commit | e8fba977f4d23b268a649769d16cea9fc3b7cc01 (patch) | |
| tree | ff334eff4e9fe06948c89ba9cedc0d371b2abf23 /mparser.py | |
| parent | 6b5c4b0a6911b1b585948f641bf3b397043c31b4 (diff) | |
| download | meson-e8fba977f4d23b268a649769d16cea9fc3b7cc01.tar.gz | |
Some sort of elif implementation.
Diffstat (limited to 'mparser.py')
| -rw-r--r-- | mparser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mparser.py b/mparser.py index f603f2ffe..20531d429 100644 --- a/mparser.py +++ b/mparser.py @@ -26,6 +26,7 @@ reserved = {'true' : 'TRUE', 'false' : 'FALSE', 'if' : 'IF', 'endif' : 'ENDIF', + 'elif' : 'ELIF', 'else' : 'ELSE', 'and' : 'AND', 'or' : 'OR', @@ -205,6 +206,10 @@ def p_statement_not(t): 'statement : NOT statement' t[0] = nodes.NotStatement(t[2]) +def p_statement_elif(t): + 'elseblock : ELIF statement EOL codeblock elseblock' + t[0] = nodes.ElifStatement(t[2], t[4], t[5], t.lineno(1)) + def p_empty_else(t): 'elseblock : ' return None |
