Module Js_of_ocaml_compiler.Javascript

module Num : sig ... end
module Label : sig ... end
type location =
  1. | Pi of Parse_info.t
  2. | N
  3. | U
type identifier = Stdlib.Utf8_string.t
type ident_string = {
  1. name : identifier;
  2. var : Code.Var.t option;
  3. loc : location;
}
type early_error = {
  1. loc : Parse_info.t;
  2. reason : string option;
}
type ident =
  1. | S of ident_string
  2. | V of Code.Var.t
and array_litteral = element_list
and element_list = element list
and element =
  1. | ElementHole
  2. | Element of expression
  3. | ElementSpread of expression
and binop =
  1. | Eq
  2. | StarEq
  3. | SlashEq
  4. | ModEq
  5. | PlusEq
  6. | MinusEq
  7. | LslEq
  8. | AsrEq
  9. | LsrEq
  10. | BandEq
  11. | BxorEq
  12. | BorEq
  13. | Or
  14. | OrEq
  15. | And
  16. | AndEq
  17. | Bor
  18. | Bxor
  19. | Band
  20. | EqEq
  21. | NotEq
  22. | EqEqEq
  23. | NotEqEq
  24. | Lt
  25. | Le
  26. | Gt
  27. | Ge
  28. | LtInt
  29. | LeInt
  30. | GtInt
  31. | GeInt
  32. | InstanceOf
  33. | In
  34. | Lsl
  35. | Lsr
  36. | Asr
  37. | Plus
  38. | Minus
  39. | Mul
  40. | Div
  41. | Mod
  42. | Exp
  43. | ExpEq
  44. | Coalesce
  45. | CoalesceEq
and unop =
  1. | Not
  2. | Neg
  3. | Pl
  4. | Typeof
  5. | Void
  6. | Delete
  7. | Bnot
  8. | IncrA
  9. | DecrA
  10. | IncrB
  11. | DecrB
  12. | Await
and arguments = argument list
and argument =
  1. | Arg of expression
  2. | ArgSpread of expression
and property_list = property list
and property =
  1. | Property of property_name * expression
  2. | PropertySpread of expression
  3. | PropertyMethod of property_name * method_
  4. | CoverInitializedName of early_error * ident * initialiser
and method_ =
  1. | MethodGet of function_declaration
  2. | MethodSet of function_declaration
  3. | Method of function_declaration
and property_name =
  1. | PNI of identifier
  2. | PNS of Stdlib.Utf8_string.t
  3. | PNN of Num.t
  4. | PComputed of expression
and expression =
  1. | ESeq of expression * expression
  2. | ECond of expression * expression * expression
  3. | EAssignTarget of binding_pattern
  4. | EBin of binop * expression * expression
  5. | EUn of unop * expression
  6. | ECall of expression * access_kind * arguments * location
  7. | ECallTemplate of expression * template * location
  8. | EAccess of expression * access_kind * expression
  9. | EDot of expression * access_kind * identifier
  10. | ENew of expression * arguments option
  11. | EVar of ident
  12. | EFun of ident option * function_declaration
  13. | EClass of ident option * class_declaration
  14. | EArrow of function_declaration * arrow_info
  15. | EStr of Stdlib.Utf8_string.t
  16. | ETemplate of template
  17. | EArr of array_litteral
  18. | EBool of bool
  19. | ENum of Num.t
  20. | EObj of property_list
  21. | ERegexp of string * string option
  22. | EYield of expression option
  23. | CoverParenthesizedExpressionAndArrowParameterList of early_error
  24. | CoverCallExpressionAndAsyncArrowHead of early_error
and arrow_info =
  1. | AUnknown
  2. | AUse_parent_fun_context
  3. | ANo_fun_context
and template = template_part list
and template_part =
  1. | TStr of Stdlib.Utf8_string.t
  2. | TExp of expression
and access_kind =
  1. | ANormal
  2. | ANullish
and statement =
  1. | Block of block
  2. | Variable_statement of variable_declaration_kind * variable_declaration list
  3. | Function_declaration of ident * function_declaration
  4. | Class_declaration of ident * class_declaration
  5. | Empty_statement
  6. | Expression_statement of expression
  7. | If_statement of expression * statement * location * (statement * location) option
  8. | Do_while_statement of statement * location * expression
  9. | While_statement of expression * statement * location
  10. | For_statement of (expression option, variable_declaration_kind * variable_declaration list) either * expression option * expression option * statement * location
  11. | ForIn_statement of (expression, variable_declaration_kind * for_binding) either * expression * statement * location
  12. | ForOf_statement of (expression, variable_declaration_kind * for_binding) either * expression * statement * location
  13. | Continue_statement of Label.t option
  14. | Break_statement of Label.t option
  15. | Return_statement of expression option
  16. | Labelled_statement of Label.t * statement * location
  17. | Switch_statement of expression * case_clause list * statement_list option * case_clause list
  18. | Throw_statement of expression
  19. | Try_statement of block * (formal_parameter option * block) option * block option
  20. | Debugger_statement
and ('left, 'right) either =
  1. | Left of 'left
  2. | Right of 'right
and block = statement_list
and statement_list = (statement * location) list
and variable_declaration =
  1. | DeclIdent of binding_ident * initialiser option
  2. | DeclPattern of binding_pattern * initialiser
and variable_declaration_kind =
  1. | Var
  2. | Let
  3. | Const
and case_clause = expression * statement_list
and initialiser = expression * location
and function_kind = {
  1. async : bool;
  2. generator : bool;
}
and class_declaration = {
  1. extends : expression option;
  2. body : class_element list;
}
and class_element =
  1. | CEMethod of bool * class_element_name * method_
  2. | CEField of bool * class_element_name * initialiser option
  3. | CEStaticBLock of statement_list
and class_element_name =
  1. | PropName of property_name
  2. | PrivName of ident
and ('a, 'b) list_with_rest = {
  1. list : 'a list;
  2. rest : 'b option;
}
and formal_parameter_list = (formal_parameter, binding) list_with_rest
and formal_parameter = binding_element
and for_binding = binding
and binding_element = binding * initialiser option
and binding =
  1. | BindingIdent of binding_ident
  2. | BindingPattern of binding_pattern
and binding_pattern =
  1. | ObjectBinding of (binding_property, binding_ident) list_with_rest
  2. | ArrayBinding of (binding_element option, binding) list_with_rest
and binding_ident = ident
and binding_property =
  1. | Prop_binding of property_name * binding_element
  2. | Prop_ident of binding_ident * initialiser option
and function_body = statement_list
and program = statement_list
and program_with_annots = (statement_list * (Js_token.Annot.t * Parse_info.t) list) list
val compare_ident : ident -> ident -> int
val is_ident : string -> bool
val is_ident' : Stdlib.Utf8_string.t -> bool
val ident : ?loc:location -> ?var:Code.Var.t -> identifier -> ident
val param : ?loc:location -> ?var:Code.Var.t -> identifier -> formal_parameter
val param' : ident -> formal_parameter
val ident_unsafe : ?loc:location -> ?var:Code.Var.t -> identifier -> ident
val bound_idents_of_params : formal_parameter_list -> ident list
val bound_idents_of_variable_declaration : variable_declaration -> ident list
val bound_idents_of_pattern : binding_pattern -> ident list
val bound_idents_of_binding : binding -> ident list
module IdentSet : Stdlib.Set.S with type elt = ident
module IdentMap : Stdlib.Map.S with type key = ident
val array : expression list -> expression
val call : expression -> expression list -> location -> expression
val variable_declaration : (ident * initialiser) list -> statement
val list : 'a list -> ('a, _) list_with_rest
val early_error : ?reason:string -> Parse_info.t -> early_error
val assignment_pattern_of_expr : binop option -> expression -> binding_pattern option