Changeset dbc733e for src/Parser
- Timestamp:
- Sep 1, 2017, 9:53:19 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- f43df73
- Parents:
- ba2a68b (diff), b0dfbc4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cc
rba2a68b rdbc733e 230 230 // ret = new UntypedExpr( new NameExpr( units ), { ret } ); 231 231 // } // if 232 232 233 233 delete &str; // created by lex 234 234 return ret; … … 282 282 } // build_varref 283 283 284 284 // TODO: get rid of this and OperKinds and reuse code from OperatorTable 285 285 static const char * OperName[] = { // must harmonize with OperKinds 286 286 // diadic … … 290 290 "?[?]", "...", 291 291 // monadic 292 "+?", "-?", "AddressOf", "*?", "!?", "~?", "++?", "?++", "--?", "?--", "&&"292 "+?", "-?", "AddressOf", "*?", "!?", "~?", "++?", "?++", "--?", "?--", 293 293 }; // OperName 294 294 -
src/Parser/ParseNode.h
rba2a68b rdbc733e 154 154 Index, Range, 155 155 // monadic 156 UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress,156 UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, 157 157 Ctor, Dtor, 158 158 }; // OperKinds -
src/Parser/parser.yy
rba2a68b rdbc733e 536 536 $$ = new ExpressionNode( build_unary_val( $1, $2 ) ); 537 537 break; 538 case OperKinds::And: 539 $$ = new ExpressionNode( new AddressExpr( build_addressOf( $2 ) ) ); 540 break; 538 541 default: 539 542 assert( false ); … … 562 565 | ATTR_IDENTIFIER '(' type ')' 563 566 { $$ = new ExpressionNode( build_attrtype( build_varref( $1 ), $3 ) ); } 564 // | ANDAND IDENTIFIER // GCC, address of label565 // { $$ = new ExpressionNode( new OperatorNode( OperKinds::LabelAddress ), new ExpressionNode( build_varref( $2 ) ); }566 567 ; 567 568
Note: See TracChangeset
for help on using the changeset viewer.