functions.incrementAndGet();
return new SimpleFunctionStart(token);
} else if (functions.get() > 0 && token.getType().isFunctionEnd()) {
// there must be a start function already, to let this be a end function
functions.decrementAndGet();
return new SimpleFunctionEnd(token);
} else if (token.getType().isUnary()) {
// there must be a end function as previous, to let this be a unary function
if (!nodes.isEmpty() && nodes.get(nodes.size() - 1) instanceof SimpleFunctionEnd) {
return new UnaryExpression(token);
}