arx.parser.core
arx.parser.core
Source: packages/arx/src/arx/parser/core.py
title: Shared parser core.
summary: >-
Hold parser state, scope bookkeeping, token helpers, and module-level
orchestration for the concern-grouped parser mixins.Classes
ParserCore(ParserMixinBase)
title: Shared parser state and orchestration.
attributes:
bin_op_precedence:
type: dict[str, int]
indent_level:
type: int
list_scopes:
type: list[set[str]]
known_class_names:
type: set[str]
tensor_scopes:
type: list[dict[str, TensorBinding | None]]
dataframe_scopes:
type: list[dict[str, DataFrameBinding | None]]
return_type_scopes:
type: list[astx.DataType]
template_type_scopes:
type: list[dict[str, astx.DataType]]
type_aliases:
type: dict[str, astx.DataType]
value_scopes:
type: list[set[str]]
tokens:
type: TokenListMethods
clean(self) -> None
title: Reset the Parser static variables.parse(self, tokens: TokenList, module_name: str='main') -> astx.Module
title: Parse the input code.
parameters:
tokens:
type: TokenList
module_name:
type: str
returns:
type: astx.Moduleget_tok_precedence(self) -> int
title: Get the precedence of the pending binary operator token.
returns:
type: int