ops/:after
selects values that appear after an anchor in source order
clojure
(:after anchor val)Where:
Behavior
- Respects lexical scope - only considers values and anchors within the same scope.
- Using (:into) on the anchor includes the anchor itself in the search area.
Examples
Find variable uses after a null check to verify safe access.
clojure
(:inside
(fun)
(:after
(if (:and (id data) (id)))
(mem (:ref (id data)))))Selects in lines { 3 } but not in { }:
typescript
def process():
if data:
return data.value
return NoneLocate translate() calls after i18n initialization to verify correct ordering.
clojure
(:inside
(fun /render/)
(:after
(call init_i18n)
(call translate)))Selects in lines { 2 } but not in { }:
typescript
def render1():
translate()
def render2():
init_i18n()
translate()
def render3():
translate()
init_i18n()Find all code after an error check to understand error handling flow.
clojure
(:inside
(fun)
(:after
(if (:and (id error) (id)))
(call)))Selects in lines { 4 } but not in { }:
typescript
def process():
if error:
log()
cleanup()Include the anchor in results by refining with :into.
clojure
(:after (:into (id a)) (id))Selects in lines { 1, 2 } but not in { }:
typescript
a
b
aArguments
anchor
• (:#across) • (:after) • (:at) • (:before) • (:inside) • (:outside) • (:kind) • (:ref) • (:text) • (:into)
Does NOT support: Composition — Replacement
val
• inherit