Crate amarok_parser

Crate amarok_parser 

Source
Expand description

Amarok parser: source text → AST.

Errors are reported via amarok_syntax::Diagnostic, shared with the interpreter so a single rendering routine handles both phases.

Internals:

  • grammar — pest-derived AmarokGrammar, Rule, and pest-error adapter
  • builders — Pair → AST conversion (statements, expressions, helpers)

Modules§

builders 🔒
grammar 🔒

Functions§

parse_expression
Parse a single expression (useful for unit tests and REPL experiments).
parse_program
Parse a full Amarok program (multiple statements).
parse_program_with_file_id
Parse a full Amarok program and stamp every span with the given FileId.
parse_statement
Parse a single statement (useful for REPL later).
set_expression_file_id 🔒
set_program_file_id 🔒
set_statement_file_id 🔒