Changeset 857b5f9 for src/Parser


Ignore:
Timestamp:
Jan 23, 2025, 12:09:40 PM (2 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
9e72bae3
Parents:
829821c
Message:

CountExpr? -> CountofExpr?. Actually the main fix was making countof use the same pattern as sizeof/alignof, using a typeof to combine the two cases and have one field instead of two.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/Parser/parser.yy

    r829821c r857b5f9  
    946946                }
    947947        | COUNTOF unary_expression
    948                 { $$ = new ExpressionNode( new ast::CountExpr( yylloc, maybeMoveBuild( $2 ) ) ); }
     948                { $$ = new ExpressionNode( new ast::CountofExpr( yylloc, new ast::TypeofType( maybeMoveBuild( $2 ) ) ) ); }
    949949        | COUNTOF '(' type_no_function ')'
    950                 { $$ = new ExpressionNode( new ast::CountExpr( yylloc, maybeMoveBuildType( $3 ) ) ); }
     950                { $$ = new ExpressionNode( new ast::CountofExpr( yylloc, maybeMoveBuildType( $3 ) ) ); }
    951951        ;
    952952
Note: See TracChangeset for help on using the changeset viewer.