Skip to content

Commit

Permalink
feat(compiler)!: Add yield and macro reserved keywords (grain-lan…
Browse files Browse the repository at this point in the history
  • Loading branch information
spotandjake authored Jan 11, 2023
1 parent 74a196d commit f0e29c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions compiler/src/parsing/lexer.re
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ let rec token = lexbuf => {
| "try" => positioned(TRY)
| "throw" => positioned(THROW)
| "catch" => positioned(CATCH)
| "macro" => positioned(MACRO)
| "yield" => positioned(YIELD)
| "..." => positioned(ELLIPSIS)
| "." => positioned(DOT)
| "::" => positioned(COLONCOLON)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/parsing/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module Grain_parsing = struct end
%token EOL EOF

// reserved tokens
%token TRY CATCH COLONCOLON
%token TRY CATCH COLONCOLON MACRO YIELD

// Not a real token, this is injected by the lexer
%token FUN
Expand Down

0 comments on commit f0e29c5

Please sign in to comment.