Skip to content

state

Define parser prefix records and modifier constants shared across the concern-grouped parser modules.

Classes:

ParsedAnnotation dataclass

ParsedAnnotation(
    modifiers: tuple[str, ...], loc: SourceLocation
)

ParsedDeclarationPrefixes dataclass

ParsedDeclarationPrefixes(
    modifiers: ParsedAnnotation | None = None,
    template_params: tuple[TemplateParam, ...] = (),
    loc: SourceLocation | None = None,
    description: str = "declaration prefix",
)

TypeUseContext

Bases: Enum

Describe where a parsed type annotation appears so surface types can decide whether runtime-layout forms are allowed.

Attributes:

allows_runtime_layout property

allows_runtime_layout: bool