pub fn parse_with_grammar(
grammar: &Grammar,
source: &[u8],
options: &FeatureParseOptions,
) -> Result<SyntaxTree, ParseWithGrammarError>Expand description
Compiles grammar with options and parses source with the same
options, as the JavaScript parseWithGrammar does.
ยงErrors
ParseWithGrammarError::Runtime when the grammar does not compile and
ParseWithGrammarError::Parse when the source is rejected.