private void addArgs() {
    if (call instanceof PropertyExpression) return;

    Expression args = AstUtil.getArguments(call);
    if (args == ArgumentListExpression.EMPTY_ARGUMENTS) return; // fast lane

    if (args instanceof ArgumentListExpression)
      addPositionalArgs((ArgumentListExpression) args);
    else if (args instanceof NamedArgumentListExpression)
      addNamedArgs((NamedArgumentListExpression) args, false);
    else if (args instanceof TupleExpression
        && ((TupleExpression)args).getExpression(0) instanceof NamedArgumentListExpression)
      //for some reason groovy wraps NamedArgumentListExpression into a TupleExpression
      addNamedArgs((NamedArgumentListExpression) ((TupleExpression)args).getExpression(0), false);
    else Assert.that(false, "unknown kind of argument list: " + args);
  }
If the given statement is a valid interaction definition, returns the rewritten statement.
If the given statement is not an interaction definition, returns null.
If the given statement is an invalid interaction definition, records a compile error
and returns null.
spock-core/src/main/java/org/spockframework/compiler/InteractionRewriter.java