summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parser.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.y b/src/parser.y
index 2e9eead..2aff29c 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -245,6 +245,10 @@ expr: literal
245 | expr tokGtEq expr { bld.addNode( AstNode::tCompGtEq ); } 245 | expr tokGtEq expr { bld.addNode( AstNode::tCompGtEq ); }
246 | '(' expr ')' 246 | '(' expr ')'
247 | expr '[' expr ']' { bld.addNode( AstNode::tIndex ); } 247 | expr '[' expr ']' { bld.addNode( AstNode::tIndex ); }
248 | expr '[' expr ']' tokPlusAssign { bld.addNode( AstNode::tIndex ); } expr { bld.addNode( AstNode::tPlusStore ); }
249 | expr '[' expr ']' tokMinusAssign { bld.addNode( AstNode::tIndex ); } expr { bld.addNode( AstNode::tMinusStore ); }
250 | expr '[' expr ']' tokTimesAssign { bld.addNode( AstNode::tIndex ); } expr { bld.addNode( AstNode::tMultiplyStore ); }
251 | expr '[' expr ']' tokDivideAssign { bld.addNode( AstNode::tIndex ); } expr { bld.addNode( AstNode::tDivideStore ); }
248 | expr '[' expr ']' '=' expr { bld.addNode( AstNode::tInsert ); } 252 | expr '[' expr ']' '=' expr { bld.addNode( AstNode::tInsert ); }
249 | '[' ']' { bld.addLiteral( Variable( Variable::tList ) ); } 253 | '[' ']' { bld.addLiteral( Variable( Variable::tList ) ); }
250 | '[' { bld.addLiteral( Variable( Variable::tList ) ); } listValues ']' 254 | '[' { bld.addLiteral( Variable( Variable::tList ) ); } listValues ']'