def tail_a

bolt@1.27.0.0 · src/rules/suspicious/prefix.bend:183

import bolt@1.27.0.0/src/rules/suspicious/prefix.bend as Prefix
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

183# the take-first shape's end, after the argument: what the finding says
184def tail_a(ma: Maybe<&2, Arg>) -> Maybe<&2, String>:
185  match ma:
186    case None{}:
187      None{}
188    case Some{Arg{+ss, r}}:
189      match r:
190        case Con{Lex.Tok{k6, +t6, l6, c6}, Con{Lex.Tok{k7, +t7, l7, c7}, Con{Lex.Tok{k8, +t8, l8, c8},
191          Con{Lex.Tok{k9, +t9, l9, c9}, Con{Lex.Tok{k10, +t10, l10, c10}, rest}}}}}:
192          Bool.pick(Maybe<&2, String>, tail_a.ok(t6, t7, t8, k9, t9, t10), Some{say(ss, t6, t9)}, None{})
193        case other:
194          None{}

Uses (8)

Used by (1)