|Constructor and Description|
|Modifier and Type||Method and Description|
Get the expected type of a child expression of
Type check the AST.
constantValue, constantValueSet, isConstant, node
addDecls, buildTypes, buildTypesEnter, checkConstants, copy, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, ext, ext, extRewrite, extRewriteEnter, init, initPred, pred, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, superLang, throwTypes, toString, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
public Node typeCheck(TypeChecker tc) throws SemanticException
leave()method of the visitor. The method should perform work that should be done after visiting the children of the node. The method may return
thisor a new copy of the node which will be installed as a child of the node's parent.
public Type childExpectedType(Expr child, AscriptionVisitor av)
this. The expected type is determined by the context in that the child occurs (e.g., for
x = e, the expected type of
eis the declared type of
x. The expected type should impose the least constraints on the child's type that are allowed by the parent node.