Up

module Javascript

: sig
#
module Label : sig
#
type t
#
val zero : t
#
val succ : t -> t
#
val to_string : t -> string
#
val of_string : string -> t
end
#
type location =
# | Pi of Parse_info.t
# | N
# | U
#
type identifier = string
#
type ident_string = {
# name
: identifier;
# var
: Code.Var.t option;
}
#
type ident =
# | S of ident_string
# | V of Code.Var.t
#
type array_litteral = element_list
#
type element_list = expression option list
#
type binop =
# | Eq
# | StarEq
# | SlashEq
# | ModEq
# | PlusEq
# | MinusEq
# | LslEq
# | AsrEq
# | LsrEq
# | BandEq
# | BxorEq
# | BorEq
# | Or
# | And
# | Bor
# | Bxor
# | Band
# | EqEq
# | NotEq
# | EqEqEq
# | NotEqEq
# | Lt
# | Le
# | Gt
# | Ge
# | InstanceOf
# | In
# | Lsl
# | Lsr
# | Asr
# | Plus
# | Minus
# | Mul
# | Div
# | Mod
#
type unop =
# | Not
# | Neg
# | Pl
# | Typeof
# | Void
# | Delete
# | Bnot
# | IncrA
# | DecrA
# | IncrB
# | DecrB
#
type arguments = expression list
#
type property_name_and_value_list = (property_name * expression) list
#
type property_name =
# | PNI of identifier
# | PNS of string
# | PNN of float
#
type expression =
# | ESeq of expression * expression
# | EBin of binop * expression * expression
# | EUn of unop * expression
# | ECall of expression * arguments * location
# | EAccess of expression * expression
# | EDot of expression * identifier
# | ENew of expression * arguments option
# | EVar of ident
# | EStr of string * [
| `Bytes
| `Utf8
]
# | EArr of array_litteral
# | EBool of bool
# | ENum of float
# | EQuote of string
# | ERegexp of string * string option
#
type statement =
# | Block of block
# | Variable_statement of variable_declaration list
# | Empty_statement
# | Expression_statement of expression
# | If_statement of expression * (statement * location) * (statement * location) option
# | Do_while_statement of (statement * location) * expression
# | While_statement of expression * (statement * location)
# | For_statement of (expression option, variable_declaration list) either * expression option * expression option * (statement * location)
# | Continue_statement of Label.t option
# | Break_statement of Label.t option
# | Return_statement of expression option
# | Labelled_statement of Label.t * (statement * location)
# | Switch_statement of expression * case_clause list * statement_list option * case_clause list
# | Throw_statement of expression
# | Try_statement of block * (ident * block) option * block option
# | Debugger_statement
#
type ('left, 'right) either =
# | Left of 'left
# | Right of 'right
#
type block = statement_list
#
type statement_list = (statement * location) list
#
type variable_declaration = ident * initialiser option
#
type case_clause = expression * statement_list
#
type initialiser = expression * location
#
type function_declaration = ident * formal_parameter_list * function_body * location
#
type function_expression = ident option * formal_parameter_list * function_body * location
#
type formal_parameter_list = ident list
#
type function_body = source_elements
#
type program = source_elements
#
type source_elements = (source_element * location) list
#
type source_element =
# | Statement of statement
# | Function_declaration of function_declaration
#
val compare_ident : ident -> ident -> int
#
val string_of_number : float -> string
#
module IdentSet : Set.S with type elt = ident
#
module IdentMap : Map.S with type key = ident
end