Ignore:
Timestamp:
Aug 23, 2024, 10:44:14 AM (6 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
d1fbc56e
Parents:
cc0aa8c
Message:

Corrected handling of va_args in the parser. It still does not get through the resolver and further updates may be required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rcc0aa8c r45ee172  
    792792                { $$ = new ExpressionNode( build_func( yylloc, $1, $3 ) ); }
    793793        | 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 ) ) ); }
    797795        | postfix_expression '`' identifier                                     // CFA, postfix call
    798796                { $$ = 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.