Skip to main content

Module prec

Module prec 

Source
Expand description

Output-precedence ranks, derived directly from the parser’s Precedence ladder (higher binds tighter) so it stays the single source of truth: reordering or inserting a parser level reranks these automatically, and only the variant each rank maps to is maintained by hand. They classify the top operator an expr prints with, so the binary-operator printer can parenthesize an operand that would otherwise re-associate on reparse. ATOM, the one rank with no parser counterpart, is layered one above the tightest parser level to mark the self-delimiting primaries. They never need parens.

Constants§

AND
ATOM
CMP
COLLATE
IS
LIKE
MULTIPLY_DIVIDE
NOT
OR
OTHER
PLUS_MINUS
POSTFIX
PREFIX