summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-01-03 00:37:48 -0700
committerMike Buland <eichlan@xagasoft.com>2012-01-03 00:37:48 -0700
commitfcd30be44982cfe79ed777b19b2543fe3e72e239 (patch)
tree1b8d5f5aebbf828d1da4a2c68c3ed22a40a7cbb7 /src
parent8b9a15a755ebc6681ff6be808615e375cb567080 (diff)
downloadstage-fcd30be44982cfe79ed777b19b2543fe3e72e239.tar.gz
stage-fcd30be44982cfe79ed777b19b2543fe3e72e239.tar.bz2
stage-fcd30be44982cfe79ed777b19b2543fe3e72e239.tar.xz
stage-fcd30be44982cfe79ed777b19b2543fe3e72e239.zip
+=, -=, *=, /= works with indexed dicts/lists
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 ']'