Changeset ecb27a7
- Timestamp:
- May 3, 2017, 2:37:26 PM (8 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:
- 365da371
- Parents:
- 37466ba0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r37466ba0 recb27a7 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.