From 128a564be05afb1cb2ec76884a81c2bd536899fd Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 3 Oct 2026 00:46:51 +0200 Subject: Replace noreturn type with an attribute --- boot/parser.yy | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'boot/parser.yy') diff --git a/boot/parser.yy b/boot/parser.yy index cc73aef..04c07a8 100644 --- a/boot/parser.yy +++ b/boot/parser.yy @@ -91,9 +91,7 @@ along with GCC; see the file COPYING3. If not see %token BOOLEAN %token LEFT_PAREN "(" RIGHT_PAREN ")" LEFT_SQUARE "[" RIGHT_SQUARE "]" LEFT_BRACE "{" RIGHT_BRACE "}" GENERIC_OPEN "#[" ATTRIBUTE_OPEN "#{" -%token ASSIGNMENT ":=" - EXCLAMATION "!" ARROW "->" - AT "@" HAT "^" +%token ASSIGNMENT ":=" ARROW "->" AT "@" HAT "^" COLON ":" SEMICOLON ";" DOT "." COMMA "," %token PROGRAM "program" MODULE "module" CAST "cast" @@ -135,7 +133,7 @@ along with GCC; see the file COPYING3. If not see %type > switch_cases; %type variable_declaration; %type > variable_declarations; -%type type_expression; +%type type_expression return_declaration; %type > type_expressions; %type expression operand simple_expression procedure_return unary_expression; %type binary_expression; @@ -146,7 +144,6 @@ along with GCC; see the file COPYING3. If not see %type > statements statement_part optional_begin_statements; %type procedure_declaration; %type procedure_heading; -%type return_declaration; %type type_declaration; %type > type_declarations sections section; %type , std::vector>> @@ -274,8 +271,7 @@ identifier_definitions: | attributed_identifier { $$.emplace_back(std::move(*$1)); } return_declaration: %empty {} - | "->" "!" { $$ = boot::procedure_type_expression::return_t(std::monostate{}); } - | "->" type_expression { $$ = boot::procedure_type_expression::return_t($2); } + | "->" type_expression { $$ = $2; } procedure_heading: "(" field_declarations ")" attributes return_declaration { -- cgit v1.2.3