pub fn emit_rust_parser(
grammar: &Grammar,
) -> Result<(RustParserArtifacts, EmitReport), GrammarEmitError>Expand description
Emits a runnable Rust parser bundle from the grammar IR.
The generated parser uses pest_derive with an inline pest grammar. AST
declarations are derived from RustTypeShape so the generated type model
can also be registered in the links codec.
ยงErrors
Returns GrammarEmitError when the underlying pest grammar emitter cannot
represent an invalid IR construct, such as empty choices or invalid repeat
bounds.