Remove anonymous records

This commit is contained in:
John David Pressman 2019-10-17 22:34:38 -07:00
parent 35a59a0867
commit 2bffba379d
2 changed files with 30 additions and 22 deletions

View File

@ -212,7 +212,10 @@ and type_tuple = (type_expr, comma) nsepseq par reg
(* Function and procedure declarations *) (* Function and procedure declarations *)
and fun_decl = and fun_decl =
BlockFun of { BlockFun of block_fun reg
| BlocklessFun of blockless_fun reg
and block_fun = {
kwd_function : kwd_function; kwd_function : kwd_function;
name : variable; name : variable;
param : parameters; param : parameters;
@ -224,16 +227,17 @@ and fun_decl =
kwd_with : kwd_with; kwd_with : kwd_with;
return : expr; return : expr;
terminator : semi option } terminator : semi option }
| BlocklessFun of
{ kwd_function : kwd_function; and blockless_fun = {
name : variable; kwd_function : kwd_function;
param : parameters; name : variable;
colon : colon; param : parameters;
ret_type : type_expr; colon : colon;
kwd_is : kwd_is; ret_type : type_expr;
kwd_expr : kwd_expr; kwd_is : kwd_is;
return : expr; kwd_expr : kwd_expr;
terminator : semi option } return : expr;
terminator : semi option }
and parameters = (param_decl, semi) nsepseq par reg and parameters = (param_decl, semi) nsepseq par reg

View File

@ -203,7 +203,10 @@ and type_tuple = (type_expr, comma) nsepseq par reg
(* Function declarations *) (* Function declarations *)
and fun_decl = and fun_decl =
BlockFun of { BlockFun of block_fun reg
| BlocklessFun of blockless_fun reg
and block_fun = {
kwd_function : kwd_function; kwd_function : kwd_function;
name : variable; name : variable;
param : parameters; param : parameters;
@ -215,16 +218,17 @@ and fun_decl =
kwd_with : kwd_with; kwd_with : kwd_with;
return : expr; return : expr;
terminator : semi option } terminator : semi option }
| BlocklessFun of
{ kwd_function : kwd_function; and blockless_fun = {
name : variable; kwd_function : kwd_function;
param : parameters; name : variable;
colon : colon; param : parameters;
ret_type : type_expr; colon : colon;
kwd_is : kwd_is; ret_type : type_expr;
kwd_expr : kwd_expr; kwd_is : kwd_is;
return : expr; kwd_expr : kwd_expr;
terminator : semi option } return : expr;
terminator : semi option }
and parameters = (param_decl, semi) nsepseq par reg and parameters = (param_decl, semi) nsepseq par reg