if (tokens.canConsume(")")) {
if (source instanceof Selector) {
return nodeName(((Selector)source).name());
}
String msg = GraphI18n.functionIsAmbiguous.text("NAME()", pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
result = nodeName(parseSelectorName(tokens, typeSystem));
tokens.consume(")");
} else if (tokens.canConsume("LOCALNAME", "(")) {
if (tokens.canConsume(")")) {
if (source instanceof Selector) {
return nodeLocalName(((Selector)source).name());
}
String msg = GraphI18n.functionIsAmbiguous.text("LOCALNAME()", pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
result = nodeLocalName(parseSelectorName(tokens, typeSystem));
tokens.consume(")");
} else if (tokens.canConsume("SCORE", "(")) {
if (tokens.canConsume(")")) {
if (source instanceof Selector) {
return fullTextSearchScore(((Selector)source).name());
}
String msg = GraphI18n.functionIsAmbiguous.text("SCORE()", pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
result = fullTextSearchScore(parseSelectorName(tokens, typeSystem));
tokens.consume(")");
} else if (tokens.canConsume("DEPTH", "(")) {
if (tokens.canConsume(")")) {
if (source instanceof Selector) {
return nodeDepth(((Selector)source).name());
}
String msg = GraphI18n.functionIsAmbiguous.text("DEPTH()", pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
result = nodeDepth(parseSelectorName(tokens, typeSystem));
tokens.consume(")");
} else if (tokens.canConsume("ID", "(")) {
if (tokens.canConsume(")")) {
if (source instanceof Selector) {
return nodeId(((Selector)source).name());
}
String msg = GraphI18n.functionIsAmbiguous.text("ID()", pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
result = nodeId(parseSelectorName(tokens, typeSystem));
tokens.consume(")");
} else if (tokens.canConsume("PATH", "(")) {
if (tokens.canConsume(")")) {
if (source instanceof Selector) {
return nodePath(((Selector)source).name());
}
String msg = GraphI18n.functionIsAmbiguous.text("PATH()", pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
result = nodePath(parseSelectorName(tokens, typeSystem));
tokens.consume(")");
} else if (tokens.canConsume("CHILDCOUNT", "(")) {
if (tokens.canConsume(")")) {
if (source instanceof Selector) {
return childCount(((Selector)source).name());
}
String msg = GraphI18n.functionIsAmbiguous.text("CHILDCOUNT()", pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
result = childCount(parseSelectorName(tokens, typeSystem));
tokens.consume(")");
} else if (tokens.canConsume("REFERENCE", "(")) {
result = parseReferenceValue(tokens, typeSystem, source);