Skip to content

(arg)

argument positions in call sites and function parameters

clojure
(arg pos? val?)

Where:

  1. pos: position in the list (1-based) *
  2. val: value at that position *

Examples

Find calls that pass None as a fallback value.

clojure
(call _ (arg 2 (id None)))

Selects in lines { 1 } but not in { 2 }:

rust
cache.get(key, None);
cache.get(key, Some(value));

Find handlers whose first parameter is ctx.

clojure
(fun _ (arg 1 (id ctx)))

Selects in lines { 1 } but not in { 2 }:

rust
fn handle(ctx: &Context, req: Request) {}
fn render(req: Request) {}

Arguments

pos

• Number • Numeric Range

Does NOT support: CompositionFree-form SelectionRefinementReplacement

val

• Identifier: shorthand for (id)
• String: shorthand for (str)
(:kind) (:ref) (:text) (call) (enum) (fun) (id) (mem) (num) (str) (:into) (:and) (:or) (:not) (:replace) (:capture)

Copyright © 2022-present Semantic Works, Inc.