package tiny_languages
Module Js_astSource
Source
type expr = | Number of float| String of string| Bool of bool| Null| Name of string| This| Array of expr list| Object of (string * expr) list| Function of func| Unary of string * expr| Update of string * bool * expr| Binary of string * expr * expr| Logical of string * expr * expr| Assign of string * expr * expr| Conditional of expr * expr * expr| Member of expr * string| Index of expr * expr| Call of expr * expr list| New of expr * expr list| Regex of string * string
Source
and statement = | Expr of expr| Let of let_kind * (string * expr option) list| Function_decl of func| Return of expr option| If of expr * stmt * stmt option| While of expr * stmt| For of stmt option * expr option * expr option * stmt| For_of of let_kind * string * expr * stmt| Break| Continue| Throw of expr| Try of stmt list * string * stmt list| Block of stmt list| Empty