Ignore:
Timestamp:
May 2, 2023, 3:44:31 AM (19 months ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ast-experimental, master
Children:
0c840fc
Parents:
1ab773e0
Message:

current progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    r1ab773e0 r46da46b  
    544544}; // OperName
    545545
    546 Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ) {
     546Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node, CastExpr::CastKind kind ) {
    547547        Type * targetType = maybeMoveBuildType( decl_node );
    548548        if ( dynamic_cast< VoidType * >( targetType ) ) {
    549549                delete targetType;
    550                 return new CastExpr( maybeMoveBuild< Expression >(expr_node), false );
     550                return new CastExpr( maybeMoveBuild< Expression >(expr_node), false, kind );
    551551        } else {
    552                 return new CastExpr( maybeMoveBuild< Expression >(expr_node), targetType, false );
     552                return new CastExpr( maybeMoveBuild< Expression >(expr_node), targetType, false, kind );
    553553        } // if
    554554} // build_cast
Note: See TracChangeset for help on using the changeset viewer.