def lone.name
import bolt@1.27.0.0/src/rules/suspicious/concat.bend as Concatimport 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
33# a leaf that is a lowercase name: its token. The rule matches a leaf's kind
34# here and in bound.is_eq only; the rest reads kinds through these
35def lone.name(nn: Tree.Node) -> Maybe<&2, Lex.Tok>:
36 match nn:
37 case Tree.Leaf{Lex.Tok{Lex.TName{}, t, l, c}}:
38 Some{Lex.Tok{Lex.TName{}, t, l, c}}
39 case other:
40 None{}