private static List<Expression> getExpressions(List<Statement> statements) {
     List<Expression> exprs = new ArrayList<>();
    for (Statement stat : statements)
      if (stat instanceof ExpressionStatement)
        exprs.add(((ExpressionStatement)stat).getExpression());
    return exprs;
  }
Returns the first expression found that is
either immediately preceded by a label with the specified name, or is the
single argument in a method call of the form "inspect_name(expression)".

<p>Example:
<pre>
def inspector = new AstInspector()
inspector.load("fooBar: foo.bar(inspect_firstArg(a), b)")
def fooBar = inspector.getExpression("fooBar")
def firstArg = inspector.getExpression("firstArg")
</pre>

@param name the name of a label immediately preceding the expression of
interest, or NAME in a method call "inspect_NAME" wrapping the expression
of interest
@return the Expression representing the first matching expression
spock-core/src/main/java/org/spockframework/util/inspector/AstInspector.java