class documentation

class LoopControlExtension(Extension): (source)

View In Hierarchy

Adds break and continue to the template engine.

Method parse If any of the :attr:`tags` matched this method is called with the parser as first argument. The token the parser stream is pointing at is the name token that matched. This method has to return one or a list of multiple nodes.
Class Variable tags Undocumented

Inherited from Extension:

Method __init__ Undocumented
Method __init_subclass__ Undocumented
Method attr Return an attribute node for the current extension. This is useful to pass constants on extensions to generated template code.
Method bind Create a copy of this extension bound to another environment.
Method call_method Call a method of the extension. This is a shortcut for :meth:`attr` + :class:`jinja2.nodes.Call`.
Method filter_stream It's passed a :class:`~jinja2.lexer.TokenStream` that can be used to filter tokens returned. This method has to return an iterable of :class:`~jinja2.lexer.Token`\s, but it doesn't have to return a :class:`~jinja2...
Method preprocess This method is called before the actual lexing and can be used to preprocess the source. The `filename` is optional. The return value must be the preprocessed source.
Class Variable identifier Undocumented
Class Variable priority Undocumented
Instance Variable environment Undocumented
def parse(self, parser): (source)

If any of the :attr:`tags` matched this method is called with the parser as first argument. The token the parser stream is pointing at is the name token that matched. This method has to return one or a list of multiple nodes.

Parameters
parser:ParserUndocumented
Returns
t.Union[nodes.Break, nodes.Continue]Undocumented
tags: set[str] = (source)

Undocumented