def call

bolt@1.27.0.0 · src/rules/pedantic/fuel.bend:131

import bolt@1.27.0.0/src/rules/pedantic/fuel.bend as Fuel
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
import bolt@1.27.0.0/src/rules/calls.bend as Calls

131# a call to name with these arguments, against every fuel parameter
132def call(fs: List<&2, Fuel>, +name: String, +as: List<&2, Tree.Node>, +path: String) -> List<&2, F.Finding>:
133  match fs:
134    case Nil{}:
135      Nil{}
136    case Con{Fuel{+fn, at}, rest}:
137      +more = call(rest, name, as, path)
138      Lazy.stop(List<&2, F.Finding>, Bool.not(String.eq(fn, name)), more,
139        _u => List.append(&2, F.Finding, literal(Calls.arg(as, at), path), more))

Uses (11)

Used by (1)