package jingoo

  1. Overview
  2. Docs
exception SyntaxError of string
type environment = {
  1. autoescape : bool;
  2. strict_mode : bool;
  3. template_dirs : string list;
  4. filters : (string * tvalue) list;
  5. extensions : string list;
}
and context = {
  1. frame_stack : frame list;
  2. macro_table : (string, macro) Hashtbl.t;
  3. namespace_table : (string, frame) Hashtbl.t;
  4. active_filters : string list;
  5. serialize : bool;
  6. output : string -> unit;
}
and frame = (string, tvalue) Hashtbl.t
and macro =
  1. | Macro of macro_arg_names * macro_defaults * macro_code
and macro_arg_names = string list
and macro_defaults = kwargs
and macro_code = statement list
and tvalue =
  1. | Tnull
  2. | Tint of int
  3. | Tbool of bool
  4. | Tfloat of float
  5. | Tstr of string
  6. | Tobj of (string * tvalue) list
  7. | Thash of (string, tvalue) Hashtbl.t
  8. | Tpat of string -> tvalue
  9. | Tlist of tvalue list
  10. | Tset of tvalue list
  11. | Tfun of ?kwargs:kwargs -> args -> tvalue
  12. | Tarray of tvalue array
  13. | Tlazy of tvalue Lazy.t
  14. | Tvolatile of unit -> tvalue
and args = tvalue list
and kwargs = (string * tvalue) list
and ast = statement list
and statement =
  1. | TextStatement of string
  2. | ExpandStatement of expression
  3. | IfStatement of branch list
  4. | ForStatement of expression * expression * ast
  5. | IncludeStatement of expression * with_context
  6. | RawIncludeStatement of expression
  7. | ExtendsStatement of string
  8. | ImportStatement of string * string option
  9. | FromImportStatement of string * expression list
  10. | SetStatement of expression * expression
  11. | BlockStatement of expression * ast
  12. | MacroStatement of expression * arguments * ast
  13. | FilterStatement of expression * ast
  14. | CallStatement of expression * arguments * arguments * ast
  15. | WithStatement of expression list * ast
  16. | AutoEscapeStatement of expression * ast
  17. | NamespaceStatement of string * (string * expression) list
  18. | Statements of ast
  19. | FunctionStatement of expression * arguments * ast
and expression =
  1. | IdentExpr of string
  2. | LiteralExpr of tvalue
  3. | NotOpExpr of expression
  4. | NegativeOpExpr of expression
  5. | PlusOpExpr of expression * expression
  6. | MinusOpExpr of expression * expression
  7. | TimesOpExpr of expression * expression
  8. | PowerOpExpr of expression * expression
  9. | DivOpExpr of expression * expression
  10. | ModOpExpr of expression * expression
  11. | AndOpExpr of expression * expression
  12. | OrOpExpr of expression * expression
  13. | NotEqOpExpr of expression * expression
  14. | EqEqOpExpr of expression * expression
  15. | LtOpExpr of expression * expression
  16. | GtOpExpr of expression * expression
  17. | LtEqOpExpr of expression * expression
  18. | GtEqOpExpr of expression * expression
  19. | DotExpr of expression * string
  20. | BracketExpr of expression * expression
  21. | ApplyExpr of expression * arguments
  22. | ListExpr of expression list
  23. | SetExpr of expression list
  24. | ObjExpr of (expression * expression) list
  25. | TestOpExpr of expression * expression
  26. | KeywordExpr of expression * expression
  27. | AliasExpr of expression * expression
  28. | InOpExpr of expression * expression
and with_context = bool
and branch = expression option * ast
and arguments = expression list
val std_env : environment
OCaml

Innovation. Community. Security.