def leaf.text

bolt@1.27.0.0 · src/rules/calls.bend:87

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

87# a leaf's text, "" for anything else
88def leaf.text(nn: Tree.Node) -> String:
89  match nn:
90    case Tree.Leaf{Lex.Tok{k, t, l, c}}:
91      t
92    case other:
93      ""

Uses (3)

Used by (5)