(* Pattern *)
datatype pat' =
- Wild_p | Int_p of int | String_p of string
+ Wild_p | Int_p of int | String_p of string | Char_p of string | Real_p of real
| Ident_p of path
| Record_p of bool * (ident * pat) list
| FlexRecord_p of (ident * pat) list
(* Expression *)
and exp' =
- Int_e of int | String_e of string | Char_e of string | Ident_e of path
+ Int_e of int | String_e of string | Char_e of string | Real_e of real | Ident_e of path
| Plus_e of exp * exp | Minus_e of exp * exp | Times_e of exp * exp
| Divide_e of exp * exp | Mod_e of exp * exp | Neg_e | Param_e
| Template_e of ident
| Record_e of bool * (ident * exp) list
| RecordUpd_e of exp * (ident * exp) list
| Proj_e of ident | App_e of exp * exp
+ | Case_e of exp * (pat * exp) list
+ | Fn_e of (pat * exp) list
+ | Raise_e of exp
and exp = EXP of exp' withext
and blockItem' =
| Assn_i of ident * exp (* assignment to ref *)
| Exp_i of exp (* expression to be evaluated *)
| Open_i of path list (* imports to top level *)
- | Ifthenelse_i of (exp * block) list * block option (* if statement *)
+ | Ifthenelse_i of exp * block * block option (* if statement *)
| Case_i of exp * (pat * block) list (* case statement *)
| Foreach_i of ident * exp * block (* foreach statement with list *)
| For_i of ident * exp * exp * block (* foreach statement with integer range *)