12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- -record(error_info, {
- return = false,
- report = false,
- list = []
- }).
- -record(dtl_context, {
- local_scopes = [],
- block_dict = dict:new(),
- trans_fun = none,
- trans_locales = [],
- auto_escape = off,
- doc_root = "",
- parse_trail = [],
- vars = [],
- record_info = [],
- filters = [],
- tags = [],
- libraries = [],
- custom_tags_dir = [],
- reader = {file, read_file},
- module = undefined,
- compiler_options = [],
- binary_strings = true,
- force_recompile = false,
- verbose = 0,
- is_compiling_dir = false,
- extension_module = undefined,
- scanner_module = erlydtl_scanner,
- scanned_tokens = [],
- all_options = [],
- errors = #error_info{},
- warnings = #error_info{},
- bin = undefined
- }).
- -record(ast_info, {
- dependencies = [],
- translatable_strings = [],
- translated_blocks= [],
- custom_tags = [],
- var_names = [],
- pre_render_asts = []}).
- -record(treewalker, {
- counter = 0,
- safe = false,
- extension = undefined,
- context
- }).
- -record(scanner_state, {
- template=[],
- scanned=[],
- pos={1,1},
- state=in_text
- }).
- -define(ERR(Err, Ctx), erlydtl_compiler_utils:add_error(?MODULE, Err, Ctx)).
- -define(WARN(Warn, Ctx), erlydtl_compiler_utils:add_warning(?MODULE, Warn, Ctx)).
- -define(V_INFO,1).
- -define(V_DEBUG,2).
- -define(V_TRACE,3).
- -define(LOG_INFO(Fmt, Args, Ctx), erlydtl_compiler_utils:print(?V_INFO, Fmt, Args, Ctx)).
- -define(LOG_DEBUG(Fmt, Args, Ctx), erlydtl_compiler_utils:print(?V_DEBUG, Fmt, Args, Ctx)).
- -define(LOG_TRACE(Fmt, Args, Ctx), erlydtl_compiler_utils:print(?V_TRACE, Fmt, Args, Ctx)).
|