CodeQL library for Rust
codeql/rust-all 0.2.7 (changelog, source)
Search

Member predicate Impl::InvocationExpr::getSyntacticArgument

Gets the argument at syntactic position pos of this expression.

Examples:

foo(42, "bar");    // `42` is syntactic argument 0 and `"bar"` is syntactic argument 1
foo.bar(42);       // `foo` is syntactic receiver and `42` is syntactic argument 0
Foo::bar(foo, 42); // `foo` is syntactic argument 0 and `42` is syntactic argument 1
Option::Some(x);   // `x` is syntactic argument 0
x + y;             // `x` is syntactic argument 0 and `y` is syntactic argument 1
-x;                // `x` is syntactic argument 0
x[y];              // `x` is syntactic argument 0 and `y` is syntactic argument 1
Expr getSyntacticArgument(ArgumentPosition pos)