Changeset d945be9 for src/Parser
- Timestamp:
- Nov 20, 2024, 9:46:17 AM (10 months ago)
- Branches:
- master
- Children:
- 1cd2839, bdf40650
- Parents:
- 7c80a86 (diff), ecf3812 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cpp
r7c80a86 rd945be9 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
r7c80a86 rd945be9 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
r7c80a86 rd945be9 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.