polyglot.ext.jl.ast
Class Disamb_c
java.lang.Object
polyglot.ext.jl.ast.Disamb_c
- All Implemented Interfaces:
- Disamb
public class Disamb_c
- extends java.lang.Object
- implements Disamb
Utility class which is used to disambiguate ambiguous
AST nodes (Expr, Type, Receiver, Qualifier, Prefix).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
v
protected ContextVisitor v
pos
protected Position pos
prefix
protected Prefix prefix
name
protected java.lang.String name
nf
protected NodeFactory nf
ts
protected TypeSystem ts
c
protected Context c
amb
protected Ambiguous amb
Disamb_c
public Disamb_c()
disambiguate
public Node disambiguate(Ambiguous amb,
ContextVisitor v,
Position pos,
Prefix prefix,
java.lang.String name)
throws SemanticException
- Disambiguate the prefix and name into a unambiguous node.
- Specified by:
disambiguate
in interface Disamb
- Returns:
- An unambiguous AST node, or null if disambiguation
fails.
- Throws:
SemanticException
disambiguatePackagePrefix
protected Node disambiguatePackagePrefix(PackageNode pn)
throws SemanticException
- Throws:
SemanticException
disambiguateTypeNodePrefix
protected Node disambiguateTypeNodePrefix(TypeNode tn)
throws SemanticException
- Throws:
SemanticException
disambiguateExprPrefix
protected Node disambiguateExprPrefix(Expr e)
throws SemanticException
- Throws:
SemanticException
disambiguateNoPrefix
protected Node disambiguateNoPrefix()
throws SemanticException
- Throws:
SemanticException
disambiguateVarInstance
protected Node disambiguateVarInstance(VarInstance vi)
throws SemanticException
- Throws:
SemanticException
makeMissingFieldTarget
protected Receiver makeMissingFieldTarget(FieldInstance fi)
throws SemanticException
- Throws:
SemanticException
typeOK
protected boolean typeOK()
packageOK
protected boolean packageOK()
exprOK
protected boolean exprOK()