Skip to content

Commit

Permalink
Add support for do!
Browse files Browse the repository at this point in the history
  • Loading branch information
vipentti committed Dec 16, 2023
1 parent 32d2021 commit 012bc10
Show file tree
Hide file tree
Showing 8 changed files with 1,481 additions and 1,449 deletions.
3 changes: 2 additions & 1 deletion src/Visp.Compiler/Parser.fsy
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let parse_error_rich = Some(fun (ctxt: ParseErrorContext<_>) ->
%token DOTDOT
%token AT
%token OPEN MODULE
%token FN FNSTAR LET USE LET_BANG USE_BANG LETSTAR MUT SET DOT NEW DOT_BRACKET DOT_PLUS IF_KW BEGIN_KW DO_KW QUOTE_KW UNQUOTE_KW SPLICE_UNQUOTE_KW QUASIQUOTE_KW
%token FN FNSTAR LET USE LET_BANG USE_BANG DO_BANG LETSTAR MUT SET DOT NEW DOT_BRACKET DOT_PLUS IF_KW BEGIN_KW DO_KW QUOTE_KW UNQUOTE_KW SPLICE_UNQUOTE_KW QUASIQUOTE_KW
%token ATOM_KW DEREF_KW WHILE TYPE RECORD MEMBER MEMBERS MEMBERFN MEMBER_GET MEMBER_SET OVERRIDE MACRO MATCH WHEN CONS CONCAT REQUIRE
%token THREAD_FIRST THREAD_LAST SYNTAX_MACRO SEQ UNION
%token INLINE REC RINIT
Expand Down Expand Up @@ -350,6 +350,7 @@ parens_expr:
| SEQ expr_list { SynExpr.FsSeq($2, lhs parseState) }
| YIELD expr { SynExpr.FsYield($2, $1, lhs parseState) }
| RETURN expr { SynExpr.FsReturn($2, $1, lhs parseState) }
| DO_BANG expr { SynExpr.FsDo($2, true, lhs parseState) }

macro_call_expr:
| macro_call { SynExpr.SyntaxMacroCall($1) }
Expand Down
Loading

0 comments on commit 012bc10

Please sign in to comment.