Changeset ecf3812 for src/Parser
- Timestamp:
- Nov 19, 2024, 5:02:03 PM (10 months ago)
- Branches:
- master
- Children:
- d945be9
- Parents:
- 29075d1
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cpp
r29075d1 recf3812 652 652 DeclarationNode * decl_node, 653 653 ExpressionNode * expr_node, 654 ast::Cast Expr::CastKind kind ) {654 ast::CastKind kind ) { 655 655 ast::Type * targetType = maybeMoveBuildType( decl_node ); 656 656 if ( dynamic_cast<ast::VoidType *>( targetType ) ) { -
src/Parser/ExpressionNode.hpp
r29075d1 recf3812 69 69 ast::DimensionExpr * build_dimensionref( const CodeLocation &, const std::string * name ); 70 70 71 ast::Expr * build_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node, ast::Cast Expr::CastKind kind = ast::CastExpr::Default );71 ast::Expr * build_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node, ast::CastKind kind = ast::CCast ); 72 72 ast::Expr * build_keyword_cast( const CodeLocation &, ast::AggregateDecl::Aggregate target, ExpressionNode * expr_node ); 73 73 ast::Expr * build_virtual_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node ); -
src/Parser/parser.yy
r29075d1 recf3812 979 979 { $$ = new ExpressionNode( new ast::VirtualCastExpr( yylloc, maybeMoveBuild( $5 ), maybeMoveBuildType( $3 ) ) ); } 980 980 | '(' 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 ) ); } 982 982 | '(' COERCE type_no_function ')' cast_expression // CFA 983 983 { SemanticError( yylloc, "Coerce cast is currently unimplemented." ); $$ = nullptr; }
Note:
See TracChangeset
for help on using the changeset viewer.