def leaf

bolt@1.27.0.0 · src/rules/pedantic/strict.bend:73

import bolt@1.27.0.0/src/rules/pedantic/strict.bend as Strict
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

73# a leaf read by its kind: past a comma, past a `=>`, or past any other
74# token; only the branch taken runs
75def leaf(
76  kk: Lex.TokKind,
77  comma: Unit -> List<&2, F.Finding>,
78  lam: Unit -> List<&2, F.Finding>,
79  plain: Unit -> List<&2, F.Finding>
80) -> List<&2, F.Finding>:
81  match kk:
82    case Lex.TComma{}:
83      comma(Unit{})
84    case Lex.TLam{}:
85      lam(Unit{})
86    case _k:
87      plain(Unit{})

Uses (4)

Used by (1)