Package gw.internal.gosu.parser
Class ContextInferenceManager
java.lang.Object
gw.internal.gosu.parser.ContextInferenceManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final ContextInferenceManager.TypeAsContextprivate static final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanvoidcancelInferences(Expression assignmentRoot, Expression rhs) voidclear()copy()static ExpressiongetUnwrappedExpression(Expression expression) If the expression is wrapped in ImplicitTypeAsExpressions, this will will unwrap them back down to the original expression.private voidhandleLoopCompromisedExpressions(ContextInferenceManager.TypeAsEntry typeAsEntry, Expression assignmentRoot) infer(Expression e) private booleanprivate booleanisStartFor(Expression possibleStart, Expression expression) voidpopCtx(boolean preserveInference) voidvoidpushCtx()voidvoidvoidvoidprivate voidreverifyExpression(ContextInferenceManager.TypeAsEntry typeAsEntry, Expression assignmentRoot, Expression expression) voidstatic IParsedElementunwrapImplicitTypeAs(Expression expression) private ExpressionunwrapParens(Expression expression) voidupdateType(Expression expression, IType typeIsType)
-
Field Details
-
ENABLED
private static final boolean ENABLED- See Also:
-
EMPTY_CTX
-
_inferenceStack
-
_last
-
_refCollectionSuspended
private boolean _refCollectionSuspended
-
-
Constructor Details
-
ContextInferenceManager
public ContextInferenceManager()
-
-
Method Details
-
copy
-
pushCtx
public void pushCtx() -
popCtx
public void popCtx(boolean preserveInference) -
pushLastCtx
public void pushLastCtx() -
restoreLastCtx
public void restoreLastCtx() -
clear
public void clear() -
updateType
-
unwrapParens
-
infer
-
isPossibleToInfer
-
cancelInferences
-
handleLoopCompromisedExpressions
private void handleLoopCompromisedExpressions(ContextInferenceManager.TypeAsEntry typeAsEntry, Expression assignmentRoot) -
reverifyExpression
private void reverifyExpression(ContextInferenceManager.TypeAsEntry typeAsEntry, Expression assignmentRoot, Expression expression) -
unwrapImplicitTypeAs
-
getUnwrappedExpression
If the expression is wrapped in ImplicitTypeAsExpressions, this will will unwrap them back down to the original expression.- Parameters:
expression-- Returns:
-
isStartFor
-
findEntry
-
areExpressionsEquivalent
-
pushLoopCompromised
public void pushLoopCompromised() -
popLoopCompromised
public void popLoopCompromised() -
suspendRefCollection
public void suspendRefCollection() -
resumeRefCollection
public void resumeRefCollection()
-