def Walker.helper

bend-lint-rules@0.2.0.0 · performance/list_index_loop.bend:65

import bend-lint-rules@0.2.0.0/performance/list_index_loop.bend as ListIndexLoop
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import bend-lint-api@0.2.0.0/shared/names.bend as Names

65# The walker `owner` is, if a call in it of a Base walker (`base`, with `args`) walks one of its parameters.
66def Walker.helper(
67  base: Maybe<&2, Walker>,
68  args: List<&2, Lint.Node>,
69  owner: Lint.Node
70) -> List<&2, Names.Named<Walker>>:
71  match base:
72    case Some{Walker{at, through}}:
73      Walker.helped(binder(List.get(&2, Lint.Node, args, at)), through, owner)
74    case None{}:
75      []

Uses (8)

Used by (1)