def work.hot
bolt@1.27.0.0 · src/rules/suspicious/eager.bend:69
import bolt@1.27.0.0/src/rules/suspicious/eager.bend as Eager
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
69
70
71
72
73def work.hot(kk: Lex.TokKind, +hot: Bool, +seg: U32, +keep: Bool) -> Bool:
74 match kk:
75 case Lex.TLam{}:
76 False{}
77 case Lex.TComma{}:
78 +in_pick = U32.is_lt(seg, 9)
79 +next = Bool.pick(U32, in_pick, (seg + 1 : U32), seg)
80 Bool.pick(Bool, in_pick, Bool.not(U32.is_lt(next, 2)), keep)
81 case other:
82 hot