pub fn parse_root_file(
path: impl Into<PathBuf>,
glyph_map: Option<&GlyphMap>,
project_root: Option<PathBuf>,
) -> Result<(ParseTree, DiagnosticSet), SourceLoadError>
Expand description
Attempt to parse a feature file from disk, including its imports.
In general, you should not need to use this method directly; instead use one
of the methods in the compile
module.
The project_root
argument is optional, and is intended for the case of
handling UFO files, where imports are resolved relative to the root directory,
and not the feature file itself.
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 it
is absent, and these names are encountered, we will report an error.
If you are compiling from memory, or otherwise want to handle loading files
and resolving imports, you can use parse_root
instead.