Skip to main content

emit

Function emit 

Source
pub fn emit(
    source: &str,
    rules: &[Rule],
    matcher: &Matcher,
) -> Result<String, Vec<Error>>
Expand description

Turn a rule set and the trie it compiles into into Rust.

source is the rule file as it should be named in the generated file and in anything the compiler says about a rule at run time, so it is the path a person could open rather than wherever the build script happened to find it.

ยงErrors

A guard this module cannot compile, reported with the position of the term that was not understood. Every other way a rule set can be wrong has been reported by the reader or by the trie before anything gets here.