API reference
python:arx:arx.parser.base.ParserMixinBase
class ParserMixinBase
Source: packages/arx/src/arx/parser/base.py:21
Shared parser mixin contract.
Attributes
-
bin_op_precedence — Bin op precedence.; Type: dict[str, int]
-
indent_level — Indent level.; Type: int
-
list_scopes — List scopes.; Type: list[set[str]]
-
known_class_names — Known class names.; Type: set[str]
-
imported_type_names — Imported type names.; Type: set[str]
-
namespace_roots — Namespace roots.; Type: set[str]
-
builtin_type_bindings — Builtin type bindings.; Type: dict[str, astx.DataType]
-
tensor_scopes — Tensor scopes.; Type: list[dict[str, TensorBinding | None]]
-
dataframe_scopes — Dataframe scopes.; Type: list[dict[str, DataFrameBinding | None]]
-
return_type_scopes — Return type scopes.; Type: list[astx.DataType]
-
template_type_scopes — Template type scopes.; Type: list[dict[str, astx.DataType]]
-
type_aliases — Type aliases.; Type: dict[str, astx.DataType]
-
value_scopes — Value scopes.; Type: list[set[str]]
-
tokens — Tokens in source order.; Type: TokenList
Methods
-
_class_name_from_expr — Return one class name for a static access candidate.
-
_consume_identifier_value — Consume one expected contextual identifier.
-
_consume_operator — Consume one expected operator token.
-
_current_return_type — Return the active function return type when one exists.
-
_declare_dataframe_name — Record one visible DataFrame binding in the current scope.
-
_declare_list_name — Record one visible list binding in the current scope.
-
_declare_tensor_name — Record one visible tensor binding in the current scope.
-
_declare_value_name — Record one visible value name in the current scope.
-
_default_value_for_type — Build one default initializer for one typed declaration.
-
_has_modifier — Return whether one modifier is present.
-
_is_dataframe_name — Return whether one visible name is declared as a DataFrame.
-
_is_identifier_value — Return whether the current token matches one identifier value.
-
_is_list_name — Return whether one visible name is declared as a list.
-
_is_operator — Return whether the current token matches one operator.
-
_is_tensor_name — Return whether one visible name is declared as a tensor.
-
_lookahead_template_argument_call — Speculatively parse one explicit template-argument list.
-
_lookup_dataframe_binding — Look up one visible DataFrame binding by name.
-
_lookup_template_bound — Look up one visible template bound by name.
-
_lookup_tensor_binding — Look up one visible tensor binding by name.
-
_name_is_shadowed — Return whether one visible value name shadows one class name.
-
_parse_template_args_for_call — Parse explicit template arguments only for call syntax.
-
_peek_token — Peek one token ahead without consuming it.
-
_pop_return_type_scope — Pop the most recent active function return type.
-
_pop_template_scope — Pop the most recent template-type scope.
-
_pop_value_scope — Pop the most recent visible-name scope.
-
_push_return_type_scope — Push one active function return type.
-
_push_template_scope — Push one template-type scope.
-
_push_value_scope — Push one visible-name scope.
-
_skip_import_layout — Consume indentation tokens used only for grouped imports.
-
_skip_template_layout — Consume indentation tokens used only inside template blocks.
-
_token_starts_expression — Return whether one token can start one expression.
-
_validate_modifier_target — Validate one modifier list against a declaration target.
-
get_tok_precedence — Get the precedence of the pending binary operator token.
-
is_declaration_start — Recognize a same-line name-first declaration.
-
is_type_alias_decl_start — Return whether the current token starts a type alias.
-
match_clause — Match a clause without consuming an unrelated line marker.
-
parse_assert_stmt — Parse one fatal assertion statement.
-
parse_assignment_or_expression — Parse a compound statement or ordinary count-loop expression.
-
parse_block — Parse one block of nodes.
-
parse_class_decl — Parse one class declaration.
-
parse_declaration_head — Consume a declaration name, colon, and optional modifier group.
-
parse_declaration_prefixes — Parse declaration prefixes before one declaration.
-
parse_expression — Parse one expression.
-
parse_extern — Parse an extern declaration.
-
parse_for_stmt — Parse a for statement.
-
parse_function — Parse a function definition.
-
parse_if_stmt — Parse an if statement.
-
parse_import_stmt — Parse one import statement.
-
parse_inline_modifiers — Parse optional whitespace-separated declaration modifiers.
-
parse_loop_transfer — Parse a statement-only transfer to the enclosing loop.
-
parse_named_declaration — Parse a name-first variable declaration without function syntax.
-
parse_prototype — Parse function/extern prototypes.
-
parse_return_function — Parse a return statement.
-
parse_statement — Parse a statement without admitting it as an expression operand.
-
parse_template_argument_list — Parse one explicit template-argument list.
-
parse_type — Parse one type annotation.
-
parse_type_alias_decl — Parse one top-level type alias declaration.
-
parse_var_expr — Parse typed variable declarations.
-
parse_while_stmt — Parse a while statement.
-
parse_with_stmt — Parse a resource scope with an optional entered-value binding.
-
resolve_binding_mutability — Resolve Arx binding mutability for variables, fields, and parameters.
-
validate_type_declaration_name — Reject inference markers as names of declared types.