Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type environment = {
autoescape : bool;
strict_mode : bool;
template_dirs : string list;
filters : (string * tvalue) list;
extensions : string list;
}
and macro_defaults = kwargs
and macro_code = statement list
and tvalue =
| Tnull
| Tint of int
| Tbool of bool
| Tfloat of float
| Tstr of string
| Tobj of (string * tvalue) list
| Thash of (string, tvalue) Hashtbl.t
| Tpat of string -> tvalue
| Tlist of tvalue list
| Tset of tvalue list
| Tfun of ?kwargs:kwargs -> args -> tvalue
| Tarray of tvalue array
| Tlazy of tvalue Lazy.t
| Tvolatile of unit -> tvalue
and args = tvalue list
and kwargs = (string * tvalue) list
and ast = statement list
and statement =
| TextStatement of string
| ExpandStatement of expression
| IfStatement of branch list
| ForStatement of expression * expression * ast
| IncludeStatement of expression * with_context
| RawIncludeStatement of expression
| ExtendsStatement of string
| ImportStatement of string * string option
| FromImportStatement of string * expression list
| SetStatement of expression * expression
| BlockStatement of expression * ast
| MacroStatement of expression * arguments * ast
| FilterStatement of expression * ast
| CallStatement of expression * arguments * arguments * ast
| WithStatement of expression list * ast
| AutoEscapeStatement of expression * ast
| NamespaceStatement of string * (string * expression) list
| Statements of ast
| FunctionStatement of expression * arguments * ast
and expression =
| IdentExpr of string
| LiteralExpr of tvalue
| NotOpExpr of expression
| NegativeOpExpr of expression
| PlusOpExpr of expression * expression
| MinusOpExpr of expression * expression
| TimesOpExpr of expression * expression
| PowerOpExpr of expression * expression
| DivOpExpr of expression * expression
| ModOpExpr of expression * expression
| AndOpExpr of expression * expression
| OrOpExpr of expression * expression
| NotEqOpExpr of expression * expression
| EqEqOpExpr of expression * expression
| LtOpExpr of expression * expression
| GtOpExpr of expression * expression
| LtEqOpExpr of expression * expression
| GtEqOpExpr of expression * expression
| DotExpr of expression * string
| BracketExpr of expression * expression
| ApplyExpr of expression * arguments
| ListExpr of expression list
| SetExpr of expression list
| ObjExpr of (expression * expression) list
| TestOpExpr of expression * expression
| KeywordExpr of expression * expression
| AliasExpr of expression * expression
| InOpExpr of expression * expression
and branch = expression option * ast
and arguments = expression list
val std_env : environment