Methods Summary |
---|
public com.sun.org.apache.xalan.internal.xsltc.compiler.QName | getName()
return(_variableName);
|
private com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg | reportError()
ErrorMsg err = new ErrorMsg(ErrorMsg.VARIABLE_UNDEF_ERR,
_variableName, this);
getParser().reportError(Constants.ERROR, err);
return(err);
|
private com.sun.org.apache.xalan.internal.xsltc.compiler.VariableRefBase | resolve(com.sun.org.apache.xalan.internal.xsltc.compiler.Parser parser, com.sun.org.apache.xalan.internal.xsltc.compiler.SymbolTable stable)
// At this point the AST is already built and we should be able to
// find any declared global variable or parameter
VariableBase ref = parser.lookupVariable(_variableName);
if (ref == null) {
ref = (VariableBase)stable.lookupName(_variableName);
}
if (ref == null) {
reportError();
return null;
}
// If in a top-level element, create dependency to the referenced var
_variable = ref;
addParentDependency();
if (ref instanceof Variable) {
return new VariableRef((Variable) ref);
}
else if (ref instanceof Param) {
return new ParameterRef((Param)ref);
}
return null;
|
public java.lang.String | toString()
return "unresolved-ref()";
|
public void | translate(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen)
if (_ref != null)
_ref.translate(classGen, methodGen);
else
reportError();
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type | typeCheck(com.sun.org.apache.xalan.internal.xsltc.compiler.SymbolTable stable)
if (_ref != null) {
final String name = _variableName.toString();
ErrorMsg err = new ErrorMsg(ErrorMsg.CIRCULAR_VARIABLE_ERR,
name, this);
}
if ((_ref = resolve(getParser(), stable)) != null) {
return (_type = _ref.typeCheck(stable));
}
throw new TypeCheckError(reportError());
|