X-Git-Url: http://git.hcoop.net/bpt/mlt.git/blobdiff_plain/c0a3b4882df1afe4a0155654c1102bd0f9729993..8291a2b90d90a19fe92cd2ee8d71b62efad58ba3:/src/tree.sml diff --git a/src/tree.sml b/src/tree.sml index 05b84d6..c74df19 100644 --- a/src/tree.sml +++ b/src/tree.sml @@ -30,7 +30,7 @@ struct (* 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 @@ -40,7 +40,7 @@ struct (* 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 @@ -53,6 +53,9 @@ struct | 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' = @@ -62,7 +65,7 @@ struct | 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 *)