Skip to content

syntax

Classes:

Functions:

SyntaxManifest dataclass

SyntaxManifest(data: dict[str, Any])

Attributes:

contextual_keywords property

contextual_keywords: set[str]

line_comment_delimiters property

line_comment_delimiters: tuple[str, ...]

literal_keywords property

literal_keywords: dict[str, Any]

multi_char_operators property

multi_char_operators: set[str]

-

Return the set of multi-character operators recognized by the lexer.

operator_symbols property

operator_symbols: set[str]

reserved_keywords property

reserved_keywords: set[str]

load_syntax_manifest

load_syntax_manifest() -> SyntaxManifest
Source code in src/arx/lexer/syntax.py
90
91
92
93
94
95
96
97
98
def load_syntax_manifest() -> SyntaxManifest:
    """
    title: Load the lexer syntax manifest bundled with the package.
    returns:
      type: SyntaxManifest
    """
    manifest = resources.files("arx.lexer").joinpath("syntax.json")
    data = json.loads(manifest.read_text(encoding="utf-8"))
    return SyntaxManifest(data)