Changeset ecf3812 for src/Parser


Ignore:
Timestamp:
Nov 19, 2024, 5:02:03 PM (10 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
d945be9
Parents:
29075d1
Message:

CastExpr reorganization and clean-up in Lvalue. I kept these from a fix that is not working.

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cpp

    r29075d1 recf3812  
    652652                DeclarationNode * decl_node,
    653653                ExpressionNode * expr_node,
    654                 ast::CastExpr::CastKind kind ) {
     654                ast::CastKind kind ) {
    655655        ast::Type * targetType = maybeMoveBuildType( decl_node );
    656656        if ( dynamic_cast<ast::VoidType *>( targetType ) ) {
  • src/Parser/ExpressionNode.hpp

    r29075d1 recf3812  
    6969ast::DimensionExpr * build_dimensionref( const CodeLocation &, const std::string * name );
    7070
    71 ast::Expr * build_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node, ast::CastExpr::CastKind kind = ast::CastExpr::Default );
     71ast::Expr * build_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node, ast::CastKind kind = ast::CCast );
    7272ast::Expr * build_keyword_cast( const CodeLocation &, ast::AggregateDecl::Aggregate target, ExpressionNode * expr_node );
    7373ast::Expr * build_virtual_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node );
  • src/Parser/parser.yy

    r29075d1 recf3812  
    979979                { $$ = new ExpressionNode( new ast::VirtualCastExpr( yylloc, maybeMoveBuild( $5 ), maybeMoveBuildType( $3 ) ) ); }
    980980        | '(' RETURN type_no_function ')' cast_expression       // CFA
    981                 { $$ = new ExpressionNode( build_cast( yylloc, $3, $5, ast::CastExpr::Return ) ); }
     981                { $$ = new ExpressionNode( build_cast( yylloc, $3, $5, ast::ReturnCast ) ); }
    982982        | '(' COERCE type_no_function ')' cast_expression       // CFA
    983983                { SemanticError( yylloc, "Coerce cast is currently unimplemented." ); $$ = nullptr; }
Note: See TracChangeset for help on using the changeset viewer.