Changeset 45ee172 for src/Parser
- Timestamp:
- Aug 23, 2024, 10:44:14 AM (2 months ago)
- Branches:
- master
- Children:
- d1fbc56e
- Parents:
- cc0aa8c
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cpp
rcc0aa8c r45ee172 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat May 16 13:17:07 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Dec 14 18:57:07 202313 // Update Count : 108 711 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Aug 23 10:22:00 2024 13 // Update Count : 1088 14 14 // 15 15 … … 780 780 } // build_compoundLiteral 781 781 782 ast::Expr * build_va_arg( const CodeLocation & location, 783 ExpressionNode * function, DeclarationNode * declaration ) { 784 return build_func( location, 785 new ExpressionNode( 786 build_varref( location, new std::string( "__builtin_va_arg" ) ) ), 787 function->set_last( new ExpressionNode( new ast::TypeExpr( location, 788 maybeMoveBuildType( declaration ) ) ) ) 789 ); 790 } 791 782 792 // Local Variables: // 783 793 // tab-width: 4 // -
src/Parser/ExpressionNode.hpp
rcc0aa8c r45ee172 83 83 ast::Expr * build_func( const CodeLocation &, ExpressionNode * function, ExpressionNode * expr_node ); 84 84 ast::Expr * build_compoundLiteral( const CodeLocation &, DeclarationNode * decl_node, InitializerNode * kids ); 85 ast::Expr * build_va_arg( const CodeLocation &, ExpressionNode * function, DeclarationNode * type ); 85 86 86 87 ast::Expr * build_enum_pos_expr( const CodeLocation &, ast::Expr * expr_node ); -
src/Parser/parser.yy
rcc0aa8c r45ee172 792 792 { $$ = new ExpressionNode( build_func( yylloc, $1, $3 ) ); } 793 793 | VA_ARG '(' primary_expression ',' declaration_specifier_nobody abstract_parameter_declarator_opt ')' 794 // { SemanticError( yylloc, "va_arg is currently unimplemented." ); $$ = nullptr; } 795 { $$ = new ExpressionNode( build_func( yylloc, new ExpressionNode( build_varref( yylloc, new string( "__builtin_va_arg" ) ) ), 796 $3->set_last( (ExpressionNode *)($6 ? $6->addType( $5 ) : $5) ) ) ); } 794 { $$ = new ExpressionNode( build_va_arg( yylloc, $3, ( $6 ? $6->addType( $5 ) : $5 ) ) ); } 797 795 | postfix_expression '`' identifier // CFA, postfix call 798 796 { $$ = new ExpressionNode( build_func( yylloc, new ExpressionNode( build_varref( yylloc, build_postfix_name( $3 ) ) ), $1 ) ); }
Note: See TracChangeset
for help on using the changeset viewer.