Skip to main content

decorate_emitted

Function decorate_emitted 

Source
pub fn decorate_emitted(
    format: &str,
    source: &str,
    decorators: &DecoratorSet,
) -> String
Expand description

The emitted grammar source after the emitter decorators of decorators.

They see each line as { format, number, line } (number counts from 1): setting line rewrites it and drop removes it. Apply it to the source an emitter such as super::emit_gbnf returns; the emit report is kept as it is.