def lone_name

bolt@1.27.0.0 · src/rules/table.bend:96

import bolt@1.27.0.0/src/rules/table.bend as Table
import 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

96# the chain is exactly one lowercase name
97def lone_name(nn: Tree.Node) -> String:
98  match nn:
99    case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TName{}, +t, l, c}}, Tree.NNil{}}:
100      t
101    case other:
102      ""

Uses (4)

Used by (1)