def apply

bolt@1.27.0.0 · src/rules/pedantic/rewalk.bend:706

import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

706# lets of a call retag that call
707def apply(nn: Tree.Node, sites: List<&2, Site>) -> List<&2, Site>:
708  match nn:
709    case Tree.NCons{Tree.Stmt{Tree.SCase{}, kids, body}, rest}:
710      apply(rest, sites)
711    case Tree.NCons{Tree.Stmt{kind, +kids, body}, rest}:
712      apply(rest, apply(body, retag_may(note_st(kids), sites)))
713    case Tree.NCons{Tree.Group{open, +kids, close}, rest}:
714      apply(rest, apply(kids, sites))
715    case Tree.NCons{h, rest}:
716      apply(rest, sites)
717    case other:
718      sites

Uses (6)

Used by (1)