Parser¶
Parsing of QVR domain-specific language syntax.
parser
¶
Parser for the quivers DSL.
The lexer/parser pipeline is delegated to panproto via the qvr
tree-sitter grammar registered in panproto-grammars-all. The public
:func:parse entry point consumes .qvr source bytes and returns a
:class:Module of dataclass AST nodes.
ParseError
¶
Bases: Exception
Raised when the .qvr source fails to parse or wrap into AST nodes.
parse
¶
parse(source: str | bytes, file_path: str = '<source>') -> Module
Parse .qvr source bytes into a :class:Module.
Source code in src/quivers/dsl/parser.py
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 | |