if (p.parseChar('('))
{
compileExpression();
if (!p.parseChar(')'))
{
throw new QueryCompilerSyntaxException("expected ')'", p.getIndex(), p.getInput());
}
return;
}
// if primary == null, literal not found...
// We will have an identifier (variable, parameter, or field of candidate class)
if (!compileIdentifier())
{
throw new QueryCompilerSyntaxException("Identifier expected", p.getIndex(), p.getInput());
}
int size = stack.size();
/*
* run function on literals or identifiers
* e.g. "primary.runMethod(arg)"
*/
while (p.parseChar('.'))
{
if (compileMethod())
{
//((ExpressionNode) stack.pop()).addChildNode((ExpressionNode) stack.pop());
}
else
{
if (!compileIdentifier())
{
throw new QueryCompilerSyntaxException("Identifier expected", p.getIndex(), p.getInput());
}
}
}
while (stack.size() > size)
{