aboutsummaryrefslogtreecommitdiff
path: root/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'parser.py')
-rwxr-xr-xparser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser.py b/parser.py
index ad2e87f..ce01011 100755
--- a/parser.py
+++ b/parser.py
@@ -119,11 +119,15 @@ def p_statement_assign(t):
'statement : expression ASSIGN statement'
t[0] = nodes.Assignment(t[1], t[3], t.lineno(1))
-def p_statement_equals(t):
+def p_statement_comparison(t):
'''statement : statement EQUALS statement
| statement NEQUALS statement'''
t[0] = nodes.Comparison(t[1], t[2], t[3], t.lineno(1))
+def p_statement_array(t):
+ '''statement : LBRACKET args RBRACKET'''
+ t[0] = nodes.ArrayStatement(t[2], t.lineno(1))
+
def p_statement_func_call(t):
'statement : expression LPAREN args RPAREN'
t[0] = nodes.FunctionCall(t[1], t[3], t.lineno(1))