class _GenerateRenderMethod(object):
Method | __init__ |
Undocumented |
Method | create_filter_callable |
write a filter-applying expression based on the filters present in the given filter names, adjusting for the global 'default' filter aliases as needed. |
Method | visitBlockTag |
Undocumented |
Method | visitCallNamespaceTag |
Undocumented |
Method | visitCallTag |
Undocumented |
Method | visitCode |
Undocumented |
Method | visitControlLine |
Undocumented |
Method | visitDefTag |
Undocumented |
Method | visitExpression |
Undocumented |
Method | visitIncludeTag |
Undocumented |
Method | visitNamespaceTag |
Undocumented |
Method | visitText |
Undocumented |
Method | visitTextTag |
Undocumented |
Method | write_cache_decorator |
write a post-function decorator to replace a rendering callable with a cached version of itself. |
Method | write_def_decl |
write a locally-available callable referencing a top-level def |
Method | write_def_finish |
write the end section of a rendering function, either outermost or inline. |
Method | write_inherit |
write the module-level inheritance-determination callable. |
Method | write_inline_def |
write a locally-available def callable inside an enclosing def. |
Method | write_metadata_struct |
Undocumented |
Method | write_module_code |
write module-level template code, i.e. that which is enclosed in <%! %> tags in the template. |
Method | write_namespaces |
write the module-level namespace-generating callable. |
Method | write_render_callable |
write a top-level render callable. |
Method | write_toplevel |
Traverse a template structure for module-level directives and generate the start of module-level code. |
Method | write_variable_declares |
write variable declarations at the top of a function. |
Instance Variable | compiler |
Undocumented |
Instance Variable | identifier_stack |
Undocumented |
Instance Variable | in_def |
Undocumented |
Instance Variable | node |
Undocumented |
Instance Variable | printer |
Undocumented |
Property | identifiers |
Undocumented |
write the end section of a rendering function, either outermost or inline.
this takes into account if the rendering function was filtered, buffered, etc. and closes the corresponding try: block if any, and writes code to retrieve captured content, apply filters, send proper return value.
write a top-level render callable.
this could be the main render() method or that of a top-level def.
write variable declarations at the top of a function.
the variable declarations are in the form of callable definitions for defs and/or name lookup within the function's context argument. the names declared are based on the names that are referenced in the function body, which don't otherwise have any explicit assignment operation. names that are assigned within the body are assumed to be locally-scoped variables and are not separately declared.
for def callable definitions, if the def is a top-level callable then a 'stub' callable is generated which wraps the current Context into a closure. if the def is not top-level, it is fully rendered as a local closure.