def literal
import bolt@1.27.0.0/src/rules/perf/chars.bend as Charsimport Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
27# one when a case pattern opens with a character literal, else zero
28def literal(kids: Tree.Node) -> U32:
29 match kids:
30 case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TChar{}, t, l, c}}, rest}:
31 1
32 case other:
33 0