def call

bend-lint-rules@0.2.0.0 · language/decreasing_call.bend:234

import bend-lint-rules@0.2.0.0/language/decreasing_call.bend as DecreasingCall
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

234# The findings about a call of its definition to itself, below `path`.
235def call(+loop: Loop, path: List<&2, Lint.Above>, node: Lint.Node) -> List<&2, Lint.Finding>:
236  match loop node:
237    case Loop{
238      params,
239      lets,
240      text
241    } Lint.Node{syntax, name, span, Con{Lint.Node{hs, callee, hp, hk, hf}, +args}, facts}:
242      finding(
243        verdict(
244          params,
245          args,
246          None{},
247          known(List.reverse(&2, Lint.Above, path), None{}, []),
248          lets,
249          0n
250        ),
251        span,
252        callee,
253        text,
254        args
255      )
256    case _ _:
257      []

Uses (10)

Used by (1)