Commit 0c1cf7af authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-10-20 20:52:38 by cvscast] Empty log message

Original author: cvscast
Date: 2002-10-20 20:52:38+00:00
parent f8f01058
......@@ -49,6 +49,12 @@ open Ast
| "fun"; f = OPT LIDENT; "("; a = LIST1 arrow SEP ";"; ")";
b = branches ->
mk loc (Abstraction { fun_name = f; fun_iface = a; fun_body = b })
| "fun"; f = OPT LIDENT;
"("; arg = LIDENT; ":"; targ = pat; ")"; ":"; tres = pat ;
"="; body = expr ->
let fun_body = (mk noloc (Capture arg), body) in
mk loc (Abstraction { fun_name = f; fun_iface = [(targ,tres)];
fun_body = [fun_body] })
| (p,e1) = let_binding; "in"; e2 = expr LEVEL "top"->
mk loc (Match (e1,[p,e2]))
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment