def sig

bolt@1.27.0.0 · src/rules/tokens.bend:9

import bolt@1.27.0.0/src/rules/tokens.bend as Tokens
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

9# the tokens without space, newlines and comments
10def sig(toks: List<&2, Lex.Tok>) -> List<&2, Lex.Tok>:
11  match toks:
12    case Nil{}:
13      Nil{}
14    case Con{Lex.Tok{+k, t, l, c}, rest}:
15      +more = sig(rest)
16      Bool.pick(List<&2, Lex.Tok>, Lex.significant(k), Lex.Tok{k, t, l, c} <> more, more)

Uses (4)

Used by (7)