public class AmbParam_c extends polyglot.ast.Node_c implements AmbParam
AmbParam
interface.Modifier and Type | Field and Description |
---|---|
protected static int |
MAX_DISAMB_CALLS
The maximum number of times that disambiguate can be called before
we allow an error message to be reported.
|
protected polyglot.ast.Id |
name |
protected ParamInstance |
pi |
Constructor and Description |
---|
AmbParam_c(polyglot.util.Position pos,
polyglot.ast.Id name,
ParamInstance pi) |
AmbParam_c(polyglot.util.Position pos,
polyglot.ast.Id name,
ParamInstance pi,
polyglot.ast.Ext ext) |
Modifier and Type | Method and Description |
---|---|
polyglot.ast.Node |
disambiguate(polyglot.visit.AmbiguityRemover sc)
Disambiguates
name . |
AmbParam |
id(polyglot.ast.Id id) |
protected <N extends AmbParam_c> |
id(N n,
polyglot.ast.Id id) |
boolean |
isDisambiguated() |
java.lang.String |
name() |
protected <N extends AmbParam_c> |
name(N n,
java.lang.String name) |
AmbParam |
name(java.lang.String name) |
Param |
parameter() |
protected polyglot.ast.Node |
paramToParam(ParamInstance pi,
polyglot.visit.AmbiguityRemover sc)
Turns a
PramaInstance object into a label node or a
principal node. |
protected polyglot.ast.Node |
principalToParam(PrincipalInstance vi,
polyglot.visit.AmbiguityRemover sc)
Turns a
PrincipalInstance object into a principal node. |
protected <N extends AmbParam_c> |
reconstruct(N n,
polyglot.ast.Id name) |
java.lang.String |
toString() |
protected polyglot.ast.Node |
varToParam(JifVarInstance vi,
polyglot.visit.AmbiguityRemover sc)
Turns a
JifVarInstance object into a label node or
a principal node |
polyglot.ast.Node |
visitChildren(polyglot.visit.NodeVisitor v) |
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, copyIfNeeded, del, del, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheck, exceptionCheckEnter, ext, ext, ext, ext, extRewrite, extRewriteEnter, extRewriteOverride, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
del, del, dump, error, error, ext, ext, ext, ext, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, extRewriteOverride, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitList
protected polyglot.ast.Id name
protected ParamInstance pi
protected static final int MAX_DISAMB_CALLS
public AmbParam_c(polyglot.util.Position pos, polyglot.ast.Id name, ParamInstance pi)
public AmbParam_c(polyglot.util.Position pos, polyglot.ast.Id name, ParamInstance pi, polyglot.ast.Ext ext)
public boolean isDisambiguated()
isDisambiguated
in interface polyglot.ast.Node
isDisambiguated
in class polyglot.ast.Node_c
public java.lang.String name()
public AmbParam name(java.lang.String name)
protected <N extends AmbParam_c> N name(N n, java.lang.String name)
public AmbParam id(polyglot.ast.Id id)
protected <N extends AmbParam_c> N id(N n, polyglot.ast.Id id)
public java.lang.String toString()
toString
in class polyglot.ast.Node_c
public polyglot.ast.Node visitChildren(polyglot.visit.NodeVisitor v)
visitChildren
in interface polyglot.ast.NodeOps
visitChildren
in class polyglot.ast.Node_c
protected <N extends AmbParam_c> N reconstruct(N n, polyglot.ast.Id name)
public polyglot.ast.Node disambiguate(polyglot.visit.AmbiguityRemover sc) throws polyglot.types.SemanticException
name
.
If name
is a VarInstance, we get a dynamic label/principal
node. If name
is a PrincipalInstance, we get the same
principal. If name
is a ParamInstance, we get a ParamLabel
or a ParamPrincipal.disambiguate
in interface polyglot.ast.NodeOps
disambiguate
in class polyglot.ast.Node_c
polyglot.types.SemanticException
protected polyglot.ast.Node varToParam(JifVarInstance vi, polyglot.visit.AmbiguityRemover sc) throws polyglot.types.SemanticException
JifVarInstance
object into a label node or
a principal nodepolyglot.types.SemanticException
protected polyglot.ast.Node principalToParam(PrincipalInstance vi, polyglot.visit.AmbiguityRemover sc)
PrincipalInstance
object into a principal node.protected polyglot.ast.Node paramToParam(ParamInstance pi, polyglot.visit.AmbiguityRemover sc)
PramaInstance
object into a label node or a
principal node.