aix.lexer.core
aix.lexer.core
Source: packages/aix/src/aix/lexer/core.py
title: AIX Unicode lexer.Classes
TokenKind(Enum)
title: Token kinds emitted by the AIX lexer.Token
title: Store one token kind, value, and source location.
attributes:
kind:
type: TokenKind
value:
type: Any
location:
type: SourceLocationMethods
get_name(self) -> str
title: Return one user-facing token name.
returns:
type: strget_display_value(self) -> str
title: Return a compact display value for token printing.
returns:
type: strTokenList
title: Simple token stream consumed by the parser.
attributes:
tokens:
type: list[Token]
position:
type: int
cur_tok:
type: TokenMethods
get_token(self) -> Token
title: Return the next token and advance.
returns:
type: Tokenget_next_token(self) -> Token
title: Advance parser cursor and return the current token.
returns:
type: TokenLexerError(Exception)
title: AIX-specific lexer error with source location.
attributes:
location:
type: SourceLocationLexer
title: Tokenize AIX source text.
attributes:
source:
type: str | NoneMethods
clean(self) -> None
title: Keep API compatibility with the Arx-derived lexer.lex(self) -> TokenList
title: Tokenize configured source and return a token stream.
returns:
type: TokenListtokenize(self) -> TokenList
title: Alias for lex used by tests and callers.
returns:
type: TokenList