API reference
python:aix:aix.lexer.Token
class Token
Token(kind: TokenKind, value: Any, location: SourceLocation = (lambda: SourceLocation(1, 1))())
Source: packages/aix/src/aix/lexer/core.py:92
Declared as: python:aix:aix.lexer.core.Token
Store one token kind, value, and source location.
Attributes
-
kind — Type: TokenKind
-
value — Type: Any
-
location — Type: SourceLocation
Methods
-
__eq__ — Compare tokens by kind and value.
-
__hash__ — Return a hash for this token.
-
__init__ —
-
__post_init__ — Copy location values away from mutable defaults.
-
__str__ — Return one human-readable token representation.
-
get_display_value — Return a compact display value for token printing.
-
get_name — Return one user-facing token name.