Skip to main content

grammar_names

Function grammar_names 

Source
pub fn grammar_names(id: &str) -> Option<GrammarNames>
Expand description

Returns the node kind and field names of a default grammar by its grammar-lock id, or None for an unknown id or an oracle grammar.

Both runtimes compile the same generated parser, so the names equal the WebAssembly grammar’s. A C compiler that re-encodes the parser’s non-ASCII names (MSVC without /utf-8) makes them differ instead of failing.