def tail

bolt@1.27.0.0 · src/rules/suspicious/empty.bend:237

import bolt@1.27.0.0/src/rules/suspicious/empty.bend as Empty
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

237# the test's end, `,`, `0n` and `)`, then x kept: the finding, if any
238def tail(mm: Maybe<&2, Taken>, +fm: Form, +ll: U32, +cc: U32) -> Maybe<&2, Hit>:
239  match mm:
240    case None{}:
241      None{}
242    case Some{Taken{+xx, r}}:
243      match r:
244        case Con{Lex.Tok{k1, +t1, l1, c1}, Con{Lex.Tok{k2, +t2, l2, c2}, Con{Lex.Tok{k3, +t3, l3, c3}, rest}}}:
245          tail.go(Bool.and(String.eq(code(k1, t1), ","), Bool.and(String.eq(code(k2, t2), "0n"),
246            Bool.and(String.eq(code(k3, t3), ")"),
247            kept(rest, xx, 0n, False{}, True{})))), fm, xx, ll, cc)
248        case other:
249          None{}

Uses (13)

Used by (1)