arx.parser.state

arx.parser.state

Source: packages/arx/src/arx/parser/state.py

title: Shared parser state declarations.
summary: >-
  Define parser prefix records and modifier constants shared across the
  concern-grouped parser modules.

Classes

TypeUseContext(Enum)

title: Type annotation use context.
summary: >-
  Describe where a parsed type annotation appears so surface types can
  decide whether runtime-layout forms are allowed.

Methods

allows_runtime_layout(self) -> bool
title: Return whether runtime-layout collection forms are allowed.
returns:
  type: bool

ParsedAnnotation

title: Parsed modifier annotation attached to the next declaration.
attributes:
  modifiers:
    type: tuple[str, Ellipsis]
  loc:
    type: SourceLocation

ParsedDeclarationPrefixes

title: Parsed declaration prefixes attached to one declaration.
attributes:
  modifiers:
    type: ParsedAnnotation | None
  template_params:
    type: tuple[astx.TemplateParam, Ellipsis]
  loc:
    type: SourceLocation | None
  description:
    type: str