/[svn]/parser/parser.ml
ViewVC logotype

Diff of /parser/parser.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by abate, Tue Jul 10 16:58:37 2007 UTC revision 24 by abate, Tue Jul 10 16:58:57 2007 UTC
# Line 49  Line 49 
49      | "fun"; f = OPT LIDENT; "("; a = LIST1 arrow SEP ";"; ")";      | "fun"; f = OPT LIDENT; "("; a = LIST1 arrow SEP ";"; ")";
50        b = branches ->        b = branches ->
51          mk loc (Abstraction { fun_name = f; fun_iface = a; fun_body = b })          mk loc (Abstraction { fun_name = f; fun_iface = a; fun_body = b })
52        | "fun";  f = OPT LIDENT;
53          "("; arg = LIDENT; ":"; targ = pat; ")"; ":"; tres = pat ;
54          "="; body = expr ->
55            let fun_body = (mk noloc (Capture arg), body) in
56            mk loc (Abstraction { fun_name = f; fun_iface = [(targ,tres)];
57                                  fun_body = [fun_body] })
58      | (p,e1) = let_binding; "in"; e2 = expr LEVEL "top"->      | (p,e1) = let_binding; "in"; e2 = expr LEVEL "top"->
59          mk loc (Match (e1,[p,e2]))          mk loc (Match (e1,[p,e2]))
60      ]      ]

Legend:
Removed from v.23  
changed lines
  Added in v.24

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5