class documentation

class TemplateParser(object): (source)

View In Hierarchy

The parser to parse template files into a hierarchic tree of instructions.
Method __call__ Undocumented
Method __init__ Undocumented
Method build_text_parser Undocumented
Method parse No summary
Instance Variable expr_parser Undocumented
Instance Variable text_parser Undocumented
Method _process_append_token Undocumented
Method _process_token Undocumented
Method _process_token_block Undocumented
Method _process_token_elif Undocumented
Method _process_token_else Undocumented
Method _process_token_end Undocumented
Method _process_token_for Undocumented
Method _process_token_if Undocumented
Method _process_token_set Undocumented
Class Variable _block_token_re Undocumented
Class Variable _for_in_token_re Undocumented
Class Variable _for_is_token_re Undocumented
Class Variable _set_token_re Undocumented
Class Variable _token_with_expr_re Undocumented
Class Variable _tokens_with_default_chomp Undocumented
Class Variable _tokens_with_end Undocumented
Class Variable _tokens_with_expr Undocumented
Class Variable _tokens_with_line_chomp Undocumented
Class Variable _tokens_without_expr Undocumented
Instance Variable _stack Undocumented
def __call__(self, builder, text): (source)

Undocumented

def __init__(self): (source)

Undocumented

def build_text_parser(self): (source)

Undocumented

def parse(self, text): (source)
Parse template text
Parameters
textthe template text
Returns
a list of SimpleTreeElements for the main template structure and any blocks defined in the template
expr_parser = (source)

Undocumented

text_parser = (source)

Undocumented

def _process_append_token(self, b, t, e): (source)

Undocumented

def _process_token(self, builder, text): (source)

Undocumented

def _process_token_block(self, b, t, e): (source)

Undocumented

def _process_token_elif(self, b, t, e): (source)

Undocumented

def _process_token_else(self, b, t, e): (source)

Undocumented

def _process_token_end(self, b, t, e): (source)

Undocumented

def _process_token_for(self, b, t, e): (source)

Undocumented

def _process_token_if(self, b, t, e): (source)

Undocumented

def _process_token_set(self, b, t, e): (source)

Undocumented

_block_token_re = (source)

Undocumented

_for_in_token_re = (source)

Undocumented

_for_is_token_re = (source)

Undocumented

_set_token_re = (source)

Undocumented

_token_with_expr_re = (source)

Undocumented

_tokens_with_default_chomp: tuple[str, ...] = (source)

Undocumented

_tokens_with_end: tuple[str, ...] = (source)

Undocumented

_tokens_with_expr: tuple[str, ...] = (source)

Undocumented

_tokens_with_line_chomp = (source)

Undocumented

_tokens_without_expr: tuple[str, ...] = (source)

Undocumented

_stack: list = (source)

Undocumented