use of org.eclipse.wst.xml.xpath2.processor.internal.StaticFunctNameError in project webtools.sourceediting by eclipse.
the class StaticNameResolver method visit.
/**
* Validate a cast expression.
*
* @param cexp
* is the expression.
* @return null.
*/
public Object visit(CastExpr cexp) {
printBinExpr("CAST", cexp);
SingleType st = (SingleType) cexp.right();
QName type = st.type();
javax.xml.namespace.QName qName = type.asQName();
Function f = _sc.resolveFunction(qName, 1);
if (f == null)
reportError(new StaticFunctNameError("Type does not exist: " + type.toString()));
cexp.set_function(f);
_resolvedFunctions.add(qName);
return null;
}
use of org.eclipse.wst.xml.xpath2.processor.internal.StaticFunctNameError in project webtools.sourceediting by eclipse.
the class StaticNameResolver method visit.
/**
* Validate a function call.
*
* @param e
* is the expression.
* @return null.
*/
public Object visit(FunctionCall e) {
QName name = e.name();
if (!expandFunctionQName(name))
reportBadPrefix(name.prefix());
javax.xml.namespace.QName qName = name.asQName();
Function f = _sc.resolveFunction(qName, e.arity());
if (f == null)
reportError(new StaticFunctNameError("Function does not exist: " + name.string() + " arity: " + e.arity()));
e.set_function(f);
_resolvedFunctions.add(qName);
visitExprs(e.iterator());
return null;
}
Aggregations