Class | Token |
No class docstring; 0/3 class variable, 2/3 methods documented |
Class | TokenStream |
A token stream is an iterable that yields Token s. The parser however does not iterate over it but calls next to go one token ahead. The current active token is stored as current . |
Function | count_newlines |
Count the number of newline characters in the string. This is useful for extensions that filter a stream. |
Constant | TOKEN_ADD |
Undocumented |
Constant | TOKEN_ASSIGN |
Undocumented |
Constant | TOKEN_BLOCK_BEGIN |
Undocumented |
Constant | TOKEN_BLOCK_END |
Undocumented |
Constant | TOKEN_COLON |
Undocumented |
Constant | TOKEN_COMMA |
Undocumented |
Constant | TOKEN_COMMENT |
Undocumented |
Constant | TOKEN_COMMENT_BEGIN |
Undocumented |
Constant | TOKEN_COMMENT_END |
Undocumented |
Constant | TOKEN_DATA |
Undocumented |
Constant | TOKEN_DIV |
Undocumented |
Constant | TOKEN_DOT |
Undocumented |
Constant | TOKEN_EOF |
Undocumented |
Constant | TOKEN_EQ |
Undocumented |
Constant | TOKEN_FLOAT |
Undocumented |
Constant | TOKEN_FLOORDIV |
Undocumented |
Constant | TOKEN_GT |
Undocumented |
Constant | TOKEN_GTEQ |
Undocumented |
Constant | TOKEN_INITIAL |
Undocumented |
Constant | TOKEN_INTEGER |
Undocumented |
Constant | TOKEN_LBRACE |
Undocumented |
Constant | TOKEN_LBRACKET |
Undocumented |
Constant | TOKEN_LINECOMMENT |
Undocumented |
Constant | TOKEN_LINECOMMENT_BEGIN |
Undocumented |
Constant | TOKEN_LINECOMMENT_END |
Undocumented |
Constant | TOKEN_LINESTATEMENT_BEGIN |
Undocumented |
Constant | TOKEN_LINESTATEMENT_END |
Undocumented |
Constant | TOKEN_LPAREN |
Undocumented |
Constant | TOKEN_LT |
Undocumented |
Constant | TOKEN_LTEQ |
Undocumented |
Constant | TOKEN_MOD |
Undocumented |
Constant | TOKEN_MUL |
Undocumented |
Constant | TOKEN_NAME |
Undocumented |
Constant | TOKEN_NE |
Undocumented |
Constant | TOKEN_OPERATOR |
Undocumented |
Constant | TOKEN_PIPE |
Undocumented |
Constant | TOKEN_POW |
Undocumented |
Constant | TOKEN_RAW_BEGIN |
Undocumented |
Constant | TOKEN_RAW_END |
Undocumented |
Constant | TOKEN_RBRACE |
Undocumented |
Constant | TOKEN_RBRACKET |
Undocumented |
Constant | TOKEN_RPAREN |
Undocumented |
Constant | TOKEN_SEMICOLON |
Undocumented |
Constant | TOKEN_STRING |
Undocumented |
Constant | TOKEN_SUB |
Undocumented |
Constant | TOKEN_TILDE |
Undocumented |
Constant | TOKEN_VARIABLE_BEGIN |
Undocumented |
Constant | TOKEN_VARIABLE_END |
Undocumented |
Constant | TOKEN_WHITESPACE |
Undocumented |
Variable | float_re |
Undocumented |
Variable | ignore_if_empty |
Undocumented |
Variable | ignored_tokens |
Undocumented |
Variable | integer_re |
Undocumented |
Variable | newline_re |
Undocumented |
Variable | operator_re |
Undocumented |
Variable | operators |
Undocumented |
Variable | reverse_operators |
Undocumented |
Variable | string_re |
Undocumented |
Variable | whitespace_re |
Undocumented |
Class | _Rule |
Undocumented |
Class | Failure |
Class that raises a TemplateSyntaxError if called. Used by the Lexer to specify known errors. |
Class | Lexer |
Class that implements a lexer for a given environment. Automatically created by the environment class, usually you don't have to do that. |
Class | OptionalLStrip |
A special tuple for marking a point in the state that can have lstrip applied. |
Class | TokenStreamIterator |
The iterator for tokenstreams. Iterate over the stream until the eof token is reached. |
Function | _describe_token_type |
Undocumented |
Function | compile_rules |
Compiles all the rules from the environment into a list of rules. |
Function | describe_token |
Returns a description of the token. |
Function | describe_token_expr |
Like describe_token but for token expressions. |
Function | get_lexer |
Return a lexer which is probably cached. |
Variable | _lexer_cache |
Undocumented |
Parameters | |
value:str | Undocumented |
Returns | |
int | Undocumented |
Undocumented
Parameters | |
token_type:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
environment:Environment | Undocumented |
Returns | |
t.List[ | Undocumented |
Parameters | |
token:Token | Undocumented |
Returns | |
str | Undocumented |
describe_token
but for token expressions.Parameters | |
expr:str | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
environment:Environment | Undocumented |
Returns | |
Lexer | Undocumented |