Skip to content

Commit

Permalink
update syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijian committed Nov 1, 2023
1 parent a69b394 commit 6417799
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ open Parser_util
%token AS "as"
%token ELSE "else"
%token FN "fn"
%token TOPLEVEL_FN "func"
%token IF "if"
%token LET "let"
%token VAR "var"
Expand Down Expand Up @@ -138,16 +137,14 @@ fun_binder:
| type_name=qual_ident_ty "::" func_name=LIDENT {}
| binder {}
fun_header:
pub=ioption("pub") toplevel_fn
pub=ioption("pub") "fn"
fun_binder=fun_binder
/* TODO: move the quants before self */
quants=optional_type_parameters
ps=option(parameters)
ts=option("->" t=type_{})
{}

%inline toplevel_fn: "func"
| "fn" {}
%inline block_expr: "{" ls=list_semis_rev(statement_expr) "}" {}

val_header : pub=ioption("pub") "let" binder=binder t=opt_annot {}
Expand Down

0 comments on commit 6417799

Please sign in to comment.