package tiny_languages

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Js_valueSource

Sourcetype value =
  1. | Undefined
  2. | Null
  3. | Bool of bool
  4. | Number of float
  5. | String of string
  6. | Object of obj
Sourceand obj = {
  1. id : int;
  2. mutable props : (string * value ref) list;
  3. kind : kind;
  4. mutable proto : obj option;
}
Sourceand kind =
  1. | Plain
  2. | Array of items
  3. | Closure of closure
  4. | Host_function of string * this:value -> value list -> value
  5. | Host_object of host
  6. | Regexp of Js_regexp.t
Sourceand host = {
  1. class_name : string;
  2. get : string -> value;
  3. set : string -> value -> unit;
  4. show : unit -> string;
}
Sourceand items = {
  1. mutable elements : value array;
  2. mutable length : int;
}
Sourceand closure = {
  1. func : Js_ast.func;
  2. scope : scope;
  3. this : value option;
}
Sourceand scope = {
  1. vars : (string, binding) Hashtbl.t;
  2. parent : scope option;
}
Sourceand binding = {
  1. mutable value : value;
  2. constant : bool;
}
Sourceexception Throw of value
Sourceval new_object : unit -> obj
Sourceval new_array : value list -> obj
Sourceval host_function : string -> (this:value -> value list -> value) -> value
Sourceval host_object : host -> value
Sourceval get_own : obj -> string -> value option
Sourceval set_own : obj -> string -> value -> unit
Sourceval keys : obj -> string list
Sourceval array_items : obj -> value list
Sourceval error : string -> string -> value
Sourceval throw : string -> string -> 'a
Sourceval typeof : value -> string
Sourceval truthy : value -> bool
Sourceval to_primitive : value -> value
Sourceval to_string : value -> string
Sourceval to_number : value -> float
Sourceval strict_equal : value -> value -> bool
Sourceval display : value -> string
Sourceval to_json : value -> string option