package liquidsoap-lang

  1. Overview
  2. Docs
include module type of struct include Runtime_term end
module Vars = Runtime_term.Vars

Sets of variables.

module Methods = Runtime_term.Methods
type custom = Runtime_term.custom
type custom_handler = Runtime_term.custom_handler = {
  1. name : string;
  2. to_string : custom -> string;
  3. to_json : pos:Pos.t list -> custom -> Json.t;
  4. compare : custom -> custom -> int;
  5. typ : Type.t;
}
type custom_term = Runtime_term.custom_term = {
  1. value : custom;
  2. handler : custom_handler;
}
type 'a term = 'a Runtime_term.term = {
  1. t : Type.t;
  2. term : 'a;
  3. flags : Flags.flags;
  4. methods : 'a term Methods.t;
}
val has_flag : 'a term -> Flags.flag -> bool
type ('a, 'b) func_argument = ('a, 'b) Runtime_term.func_argument = {
  1. label : string;
  2. as_variable : string option;
  3. default : 'a option;
  4. typ : 'b;
}
type ('a, 'b) func = ('a, 'b) Runtime_term.func = {
  1. mutable free_vars : Vars.t option;
  2. name : string option;
  3. arguments : ('a, 'b) func_argument list;
  4. body : 'a;
}
type 'a app = 'a * (string * 'a) list
type ('a, 'b) cast = ('a, 'b) Runtime_term.cast = {
  1. cast : 'a;
  2. typ : 'b;
}
type ('a, 'b) common_ast = [
  1. | `Custom of custom_term
  2. | `Tuple of 'a list
  3. | `Null
  4. | `Cast of ('a, 'b) cast
  5. | `Open of 'a * 'a
  6. | `Var of string
  7. | `Seq of 'a * 'a
]
type 'a let_t = 'a Runtime_term.let_t = {
  1. doc : Doc.Value.t option;
  2. replace : bool;
  3. pat : [ `PVar of string list | `PTuple of string list ];
  4. mutable gen : Type.var list;
  5. def : 'a;
  6. body : 'a;
}
type cached_env = Runtime_term.cached_env = {
  1. var_name : int;
  2. var_id : int;
  3. env : Typing.env;
}
type 'a runtime_ast = [
  1. | `Int of int
  2. | `Cache_env of cached_env ref
  3. | `Float of float
  4. | `String of string
  5. | `Bool of bool
  6. | `Let of 'a let_t
  7. | `List of 'a list
  8. | `App of 'a * (string * 'a) list
  9. | `Invoke of 'a Runtime_term.invoke
  10. | `Hide of 'a * string list
  11. | `Encoder of string * 'a {encoder_params}5
  12. | `Fun of ('a, Type.t) func
]
type comment = [
  1. | `Before of string list
  2. | `After of string list
]
type string_param = [
  1. | `Verbatim of string
  2. | `String of pos * (char * string)
]
type track_annotation = string * string_param
type inc_type = [
  1. | `Lib
  2. | `Extra
  3. | `Default
]
type inc = {
  1. inc_type : inc_type;
  2. inc_name : string;
  3. inc_pos : pos;
}
type pattern = {
  1. pat_pos : pos;
  2. pat_entry : pattern_entry;
}
and pattern_entry = [
  1. | `PVar of string list
    (*

    a field

    *)
  2. | `PTuple of pattern list
    (*

    a tuple

    *)
  3. | `PList of pattern list * (pos * string) option * pattern list
    (*

    a list

    *)
  4. | `PMeth of pattern option * (string * meth_term_default) list
    (*

    a value with methods

    *)
]
and meth_term_default = [
  1. | `Nullable
  2. | `Pattern of pattern
  3. | `None
]
type _of = {
  1. only : string list;
  2. except : string list;
  3. source : string;
}
type _if = {
  1. if_condition : t;
  2. if_then : t;
  3. if_elsif : (t * t) list;
  4. if_else : t option;
}
and _while = {
  1. while_condition : t;
  2. while_loop : t;
}
and _for = {
  1. for_variable : string;
  2. for_from : t;
  3. for_to : t;
  4. for_loop : t;
}
and iterable_for = {
  1. iterable_for_variable : string;
  2. iterable_for_iterator : t;
  3. iterable_for_loop : t;
}
and _try = {
  1. try_body : t;
  2. try_variable : string;
  3. try_errors_list : t option;
  4. try_handler : t option;
  5. try_finally : t option;
}
and let_decoration = [
  1. | `None
  2. | `Recursive
  3. | `Replaces
  4. | `Eval
  5. | `Sqlite_query
  6. | `Sqlite_row
  7. | `Yaml_parse
  8. | `Xml_parse
  9. | `Json_parse of (string * t) list
]
and _let = {
  1. decoration : let_decoration;
  2. pat : pattern;
  3. arglist : fun_arg list option;
  4. cast : type_annotation option;
  5. def : t;
}
and invoke = {
  1. invoked : t;
  2. optional : bool;
  3. meth : invoke_meth;
}
and invoke_meth = [
  1. | `String of string
  2. | `App of string * app_arg list
]
and app_arg = [
  1. | `Term of string * t
  2. | `Argsof of _of
]
and fun_arg = [
  1. | `Term of (t, type_annotation option) func_argument
  2. | `Argsof of _of
]
and list_el = [
  1. | `Term of t
  2. | `Ellipsis of t
]
and if_def = {
  1. if_def_negative : bool;
  2. if_def_condition : string;
  3. if_def_then : t;
  4. if_def_else : t option;
}
and if_version = {
  1. if_version_op : [ `Eq | `Geq | `Leq | `Gt | `Lt ];
  2. if_version_version : Lang_string.Version.t;
  3. if_version_then : t;
  4. if_version_else : t option;
}
and if_encoder = {
  1. if_encoder_negative : bool;
  2. if_encoder_condition : string;
  3. if_encoder_then : t;
  4. if_encoder_else : t option;
}
and time_el = {
  1. week : int option;
  2. hours : int option;
  3. minutes : int option;
  4. seconds : int option;
}
and meth_annotation = {
  1. optional_meth : bool;
  2. name : string;
  3. typ : type_annotation;
  4. json_name : string option;
}
and source_track_annotation = {
  1. track_name : string;
  2. track_type : string;
  3. track_params : track_annotation list;
}
and source_annotation = {
  1. extensible : bool;
  2. tracks : source_track_annotation list;
}
and argument = bool * string * type_annotation
and type_annotation = [
  1. | `Named of string
  2. | `Nullable of type_annotation
  3. | `List of type_annotation
  4. | `Json_object of type_annotation
  5. | `Tuple of type_annotation list
  6. | `Arrow of argument list * type_annotation
  7. | `Record of meth_annotation list
  8. | `Method of type_annotation * meth_annotation list
  9. | `Invoke of type_annotation * string
  10. | `Source of string * source_annotation
]
and parsed_ast = [
  1. | `If of _if
  2. | `Inline_if of _if
  3. | `If_def of if_def
  4. | `If_version of if_version
  5. | `If_encoder of if_encoder
  6. | `While of _while
  7. | `For of _for
  8. | `Iterable_for of iterable_for
  9. | `List of list_el list
  10. | `Try of _try
  11. | `Regexp of string * char list
  12. | `Time_interval of time_el * time_el
  13. | `Time of time_el
  14. | `Def of _let * t
  15. | `Let of _let * t
  16. | `Binding of _let * t
  17. | `App of t * app_arg list
  18. | `Invoke of invoke
  19. | `Fun of fun_arg list * t
  20. | `RFun of string * fun_arg list * t
  21. | `Not of t
  22. | `Get of t
  23. | `Set of t * t
  24. | `Methods of t option * methods list
  25. | `Negative of t
  26. | `Append of t * t
  27. | `Assoc of t * t
  28. | `Infix of t * string * t
  29. | `BoolOp of string * t list
  30. | `Coalesce of t * t
  31. | `At of t * t
  32. | `Simple_fun of t
  33. | `String_interpolation of char * string_interpolation list
  34. | `Include of inc
  35. | `Int of string
  36. | `Bool of bool
  37. | `Float of string
  38. | `String of char * string
  39. | `Block of t
  40. | `Parenthesis of t
  41. | `Encoder of encoder
  42. | `Eof
  43. | (t, type_annotation) common_ast
]
and t = {
  1. term : parsed_ast;
  2. pos : pos;
  3. mutable comments : (pos * comment) list;
}
and methods = [
  1. | `Ellipsis of t
  2. | `Method of string * t
]
and string_interpolation = [
  1. | `String of string
  2. | `Term of t
]
and encoder_params = [ `Anonymous of string_param | `Encoder of encoder | `Labelled of string_param * t ] list
and encoder = string * encoder_params
val hash_fold_source_track_annotation : source_track_annotation Term_hash.Ppx_hash_lib.Std.Hash.folder
val unit : [> `Tuple of 'a list ]
val make : ?comments:(pos * comment) list -> pos:pos -> parsed_ast -> t
val iter_term : (t -> unit) -> t -> unit
val iter_fun_args : (t -> unit) -> fun_arg list -> unit
OCaml

Innovation. Community. Security.