module documentation
Implements a Jinja / Python combination lexer. The ``Lexer`` class is used to do some preprocessing. It filters out invalid operators like the bitshift operators we don't allow in templates. It separates template code and python code in expressions.
Class |
|
Class that raises a `TemplateSyntaxError` if called. Used by the `Lexer` to specify known errors. |
Class |
|
Class that implements a lexer for a given environment. Automatically created by the environment class, usually you don't have to do that. |
Class |
|
A special tuple for marking a point in the state that can have lstrip applied. |
Class |
|
No class docstring; 0/3 class variable, 2/3 methods documented |
Class |
|
A token stream is an iterable that yields :class:`Token`\s. The parser however does not iterate over it but calls :meth:`next` to go one token ahead. The current active token is stored as :attr:`current`. |
Class |
|
The iterator for tokenstreams. Iterate over the stream until the eof token is reached. |
Function | compile |
Compiles all the rules from the environment into a list of rules. |
Function | count |
Count the number of newline characters in the string. This is useful for extensions that filter a stream. |
Function | describe |
Returns a description of the token. |
Function | describe |
Like `describe_token` but for token expressions. |
Function | get |
Return a lexer which is probably cached. |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Constant | TOKEN |
Undocumented |
Variable | float |
Undocumented |
Variable | ignore |
Undocumented |
Variable | ignored |
Undocumented |
Variable | integer |
Undocumented |
Variable | newline |
Undocumented |
Variable | operator |
Undocumented |
Variable | operators |
Undocumented |
Variable | reverse |
Undocumented |
Variable | string |
Undocumented |
Variable | whitespace |
Undocumented |
Class | _ |
Undocumented |
Function | _describe |
Undocumented |
Variable | _lexer |
Undocumented |
Compiles all the rules from the environment into a list of rules.
Parameters | |
environment:Environment | Undocumented |
Returns | |
t.List[ | Undocumented |
Return a lexer which is probably cached.
Parameters | |
environment:Environment | Undocumented |
Returns | |
Lexer | Undocumented |