def bangs
import bend-lint-rules@0.2.0.0/performance/gpu_fit.bend as GpuFitimport Base
189# Where `text` writes `!(`, from offset `at`: the end of each bang's name.
190def bangs(s: String, +at: U32, out: List<&2, U32>) -> List<&2, U32>:
191 match s:
192 case SNil{}:
193 out
194 case SCon{'!', SCon{'(', rest}}:
195 bangs(rest, (at + 2: U32), at <> out)
196 case SCon{c, rest}:
197 bangs(rest, (at + 1: U32), out)