EndToken
This class represents the termination point of an expression within a parsing context. It defines a binding power of zero and triggers an error if encountered during a null denotation operation, indicating an incomplete or unexpected end to the expression.
Attributes
| Attribute | Type | Description |
|---|---|---|
| lbp | int = 0 | Left binding power used by the Pratt parser to determine operator precedence, set to 0 to indicate the end of a token stream. |
Methods
nud()
@classmethod
def nud(
parser: [Parser](../../test/html/parser.md?sid=django_test_html_parser)
) - > null
Raises a parser error indicating an unexpected end of expression within an if tag.
Parameters
| Name | Type | Description |
|---|---|---|
| parser | [Parser](../../test/html/parser.md?sid=django_test_html_parser) | The parser instance used to raise the error with the appropriate context and error class. |
Returns
| Type | Description |
|---|---|
null | This method does not return a value as it always raises an exception. |