public static class GTParameter.TypeInference extends ParseTreeTypeInference
GTParameter.Evaluator
.Red (tfeng) |
Yellow (tfeng) |
_inferredChildType, _scope
Constructor and Description |
---|
TypeInference(Pattern pattern,
MatchResult matchResult)
Construct a type inference.
|
Modifier and Type | Method and Description |
---|---|
Type |
inferTypes(ASTPtRootNode node,
ParserScope scope)
Infer the type of the parse tree with the specified root node using
the specified scope to resolve the values of variables.
|
void |
visitMethodCallNode(ASTPtMethodCallNode node)
Set the type of the given node to be the return type of the
method determined for the given node.
|
_assert, _getMethodReturnType, _getTypeForName, _inferAllChildren, _inferChild, _isValidName, _methodCall, _setType, inferTypes, visitArrayConstructNode, visitBitwiseNode, visitFunctionalIfNode, visitFunctionApplicationNode, visitFunctionDefinitionNode, visitLeafNode, visitLogicalNode, visitMatrixConstructNode, visitPowerNode, visitProductNode, visitRecordConstructNode, visitRelationalNode, visitShiftNode, visitSumNode, visitUnaryNode
_unsupportedVisitException, _visitAllChildren, _visitChild, visitAssignmentNode, visitUnionConstructNode
public TypeInference(Pattern pattern, MatchResult matchResult)
pattern
- The pattern.matchResult
- The match result for the match between the
pattern and a host model.public Type inferTypes(ASTPtRootNode node, ParserScope scope) throws IllegalActionException
inferTypes
in class ParseTreeTypeInference
node
- The root of the parse tree.scope
- The scope for evaluation.IllegalActionException
- If an error occurs during
evaluation.public void visitMethodCallNode(ASTPtMethodCallNode node) throws IllegalActionException
visitMethodCallNode
in interface ParseTreeVisitor
visitMethodCallNode
in class ParseTreeTypeInference
node
- The specified node.IllegalActionException
- If an inference error occurs.