Package gw.internal.gosu.parser
Class ContextInferenceManager
- java.lang.Object
-
- gw.internal.gosu.parser.ContextInferenceManager
-
public class ContextInferenceManager extends Object
-
-
Constructor Summary
Constructors Constructor Description ContextInferenceManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelInferences(Expression assignmentRoot, Expression rhs)voidclear()ContextInferenceManagercopy()static ExpressiongetUnwrappedExpression(Expression expression)If the expression is wrapped in ImplicitTypeAsExpressions, this will will unwrap them back down to the original expression.ITypeinfer(Expression e)voidpopCtx(boolean preserveInference)voidpopLoopCompromised()voidpushCtx()voidpushLastCtx()voidpushLoopCompromised()voidrestoreLastCtx()voidresumeRefCollection()voidsuspendRefCollection()static IParsedElementunwrapImplicitTypeAs(Expression expression)voidupdateType(Expression expression, IType typeIsType)
-
-
-
Method Detail
-
copy
public ContextInferenceManager copy()
-
pushCtx
public void pushCtx()
-
popCtx
public void popCtx(boolean preserveInference)
-
pushLastCtx
public void pushLastCtx()
-
restoreLastCtx
public void restoreLastCtx()
-
clear
public void clear()
-
updateType
public void updateType(Expression expression, IType typeIsType)
-
infer
public IType infer(Expression e)
-
cancelInferences
public void cancelInferences(Expression assignmentRoot, Expression rhs)
-
unwrapImplicitTypeAs
public static IParsedElement unwrapImplicitTypeAs(Expression expression)
-
getUnwrappedExpression
public static Expression getUnwrappedExpression(Expression expression)
If the expression is wrapped in ImplicitTypeAsExpressions, this will will unwrap them back down to the original expression.- Parameters:
expression-- Returns:
-
pushLoopCompromised
public void pushLoopCompromised()
-
popLoopCompromised
public void popLoopCompromised()
-
suspendRefCollection
public void suspendRefCollection()
-
resumeRefCollection
public void resumeRefCollection()
-
-