Package gw.internal.gosu.parser
Class ContextInferenceManager
java.lang.Object
gw.internal.gosu.parser.ContextInferenceManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private static final ContextInferenceManager.TypeAsContext
private static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
void
cancelInferences
(Expression assignmentRoot, Expression rhs) void
clear()
copy()
static Expression
getUnwrappedExpression
(Expression expression) If the expression is wrapped in ImplicitTypeAsExpressions, this will will unwrap them back down to the original expression.private void
handleLoopCompromisedExpressions
(ContextInferenceManager.TypeAsEntry typeAsEntry, Expression assignmentRoot) infer
(Expression e) private boolean
private boolean
isStartFor
(Expression possibleStart, Expression expression) void
popCtx
(boolean preserveInference) void
void
pushCtx()
void
void
void
void
private void
reverifyExpression
(ContextInferenceManager.TypeAsEntry typeAsEntry, Expression assignmentRoot, Expression expression) void
static IParsedElement
unwrapImplicitTypeAs
(Expression expression) private Expression
unwrapParens
(Expression expression) void
updateType
(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()
-