Skip to content

Commit

Permalink
update syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijian committed Oct 20, 2023
1 parent 44c6391 commit 6e154a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,16 @@ fun_binder:
| type_name=qual_ident_ty "::" func_name=LIDENT {}
| binder {}
fun_header:
pub=ioption("pub") "func"
pub=ioption("pub") toplevel_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 6e154a0

Please sign in to comment.