Changeset 6250a312 for src/Parser/parser.yy
- Timestamp:
- May 10, 2017, 5:00:47 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:
- 8514fe19, dbfb35d
- Parents:
- 0f9bef3 (diff), 29cf9c8 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r0f9bef3 r6250a312 393 393 | '(' compound_statement ')' // GCC, lambda expression 394 394 { $$ = new ExpressionNode( build_valexpr( $2 ) ); } 395 | primary_expression '{' argument_expression_list '}' // CFA 396 { 397 Token fn; 398 fn.str = new std::string( "?{}" ); // location undefined - use location of '{'? 399 $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) ) ); 400 } 395 401 ; 396 402 … … 425 431 | '(' type_name_no_function ')' '{' initializer_list comma_opt '}' // C99, compound-literal 426 432 { $$ = new ExpressionNode( build_compoundLiteral( $2, new InitializerNode( $5, true ) ) ); } 427 | postfix_expression '{' argument_expression_list '}' // CFA433 | '^' primary_expression '{' argument_expression_list '}' // CFA 428 434 { 429 435 Token fn; 430 fn.str = new st d::string( "?{}" ); // location undefined - use location of '{'?431 $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 )) ) );436 fn.str = new string( "^?{}" ); // location undefined 437 $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4 ) ) ); 432 438 } 433 439 ; … … 730 736 | exception_statement 731 737 | asm_statement 732 | '^' postfix_expression '{' argument_expression_list '}' ';' // CFA733 {734 Token fn;735 fn.str = new string( "^?{}" ); // location undefined736 $$ = new StatementNode( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4 ) ) ) ) );737 }738 ;739 738 740 739 labeled_statement:
Note: See TracChangeset
for help on using the changeset viewer.