aboutsummaryrefslogtreecommitdiff
path: root/mparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'mparser.py')
-rw-r--r--mparser.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mparser.py b/mparser.py
index f603f2f..20531d4 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