def literal
import bolt@1.27.0.0/src/rules/table.bend as Tableimport 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
16# is the chain exactly one number?
17def literal(nn: Tree.Node) -> Bool:
18 match nn:
19 case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TNum{}, t, l, c}}, Tree.NNil{}}:
20 True{}
21 case other:
22 False{}