Function fea_rs::parse::parse_root
source · pub fn parse_root(
path: OsString,
glyph_map: Option<&GlyphMap>,
resolver: impl SourceResolver + 'static
) -> Result<(ParseTree, Vec<Diagnostic>), SourceLoadError>Expand description
Entry point for parsing.
This method provides full control over how sources are located and include
statements are resolved, by allowing you to provide a custom SourceResolver.
The path argument is identifies the root source; it will be resolved against
the provided resolver.
The glyph_map, if provided, is used to disambiguate between certain tokens
that are allowed in FEA syntax but which are also legal glyph names. If you
are not compiling the parse results, you can omit it.