diff options
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/lexer.ll | 3 | ||||
| -rw-r--r-- | boot/parser.yy | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/boot/lexer.ll b/boot/lexer.ll index eb1bbd3..d0493c1 100644 --- a/boot/lexer.ll +++ b/boot/lexer.ll @@ -444,6 +444,9 @@ to { ! { return yy::parser::make_EXCLAMATION(this->location); } +-> { + return yy::parser::make_ARROW(this->location); +} . { std::stringstream ss; diff --git a/boot/parser.yy b/boot/parser.yy index 669115b..b53a94c 100644 --- a/boot/parser.yy +++ b/boot/parser.yy @@ -90,7 +90,7 @@ along with GCC; see the file COPYING3. If not see %token LEFT_PAREN "(" RIGHT_PAREN ")" LEFT_SQUARE "[" RIGHT_SQUARE "]" %token LEFT_BRACE "{" RIGHT_BRACE "}" %token ASSIGNMENT ":=" - EXCLAMATION "!" + EXCLAMATION "!" ARROW "->" AT "@" HAT "^" COLON ":" SEMICOLON ";" DOT "." COMMA "," %token NOT "~" @@ -188,8 +188,8 @@ identifier_definitions: | identifier_definition { $$.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); } + | "->" "!" { $$ = boot::procedure_type_expression::return_t(std::monostate{}); } + | "->" type_expression { $$ = boot::procedure_type_expression::return_t($2); } procedure_heading: "(" optional_fields ")" return_declaration { $$ = std::make_unique<boot::procedure_type_expression>(boot::make_position(@$), $2, $4); } procedure_declaration: |
