Skip to main content

grammar_precedence_concepts

Function grammar_precedence_concepts 

Source
pub fn grammar_precedence_concepts(grammar: &Grammar) -> Vec<PrecedenceUse>
Expand description

Returns every precedence use in grammar with the concept it expresses.

Precedence inside a token rule or a token capture decides between tokens (lexical precedence); anywhere else, and dynamic precedence everywhere, it decides between parse alternatives (syntactic precedence). Both runtimes read tree-sitter’s prec the same way, so the two never merge.