diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-01-03 00:37:48 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-01-03 00:37:48 -0700 |
commit | fcd30be44982cfe79ed777b19b2543fe3e72e239 (patch) | |
tree | 1b8d5f5aebbf828d1da4a2c68c3ed22a40a7cbb7 /src/parser.y | |
parent | 8b9a15a755ebc6681ff6be808615e375cb567080 (diff) | |
download | stage-fcd30be44982cfe79ed777b19b2543fe3e72e239.tar.gz stage-fcd30be44982cfe79ed777b19b2543fe3e72e239.tar.bz2 stage-fcd30be44982cfe79ed777b19b2543fe3e72e239.tar.xz stage-fcd30be44982cfe79ed777b19b2543fe3e72e239.zip |
+=, -=, *=, /= works with indexed dicts/lists
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 4 |
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 ']' |