io.sarl.lang.typesystem
Class SARLTypeComputer
All Superinterfaces:
org.eclipse.xtext.xbase.typesystem.computation.ITypeComputer
class SARLTypeComputer
extends java.lang.Object
Customized type computer for SARL specific expressions.

It resolves the ambiguous calls with an approach that is supporting Deprecated This type computer prefers the feature candidate that is not marked with Deprecated. Otherwise, its behavior is the same as the standard Xbase type computer implementation: the first candidate is preferred, and a specific issue message is output.

This type computer resolves the types for the SARL keywords: break, continue and assert.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.5
Constructor Summary
Constructor and description
new
Action Summary
Modifier and type Action and description
protected void _computeTypes(SarlAssertExpression,ITypeComputationState)
Compute the type of an assert expression.
protected void _computeTypes(SarlBreakExpression,ITypeComputationState)
Compute the type of a break expression.
protected void _computeTypes(SarlCastedExpression,ITypeComputationState)
Compute the type of a casted expression.
protected void _computeTypes(SarlContinueExpression,ITypeComputationState)
Compute the type of a break expression.
protected void _computeTypes(XAbstractFeatureCall,ITypeComputationState)
void computeTypes(XExpression,ITypeComputationState)
protected org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate getBestCandidate(List<E>)
protected boolean isIgnorableCallToFeature(ILinkingCandidate)
Replies if ambiguity could be removed for the given feature.
Constructor Details
new
new
Action Details
_computeTypes(SarlAssertExpression,ITypeComputationState)
protected def _computeTypes(SarlAssertExpression,ITypeComputationState)
Compute the type of an assert expression.
Parameters:
object - the expression.
state - the state of the type resolver.
_computeTypes(SarlBreakExpression,ITypeComputationState)
protected def _computeTypes(SarlBreakExpression,ITypeComputationState)
Compute the type of a break expression.
Parameters:
object - the expression.
state - the state of the type resolver.
_computeTypes(SarlCastedExpression,ITypeComputationState)
protected def _computeTypes(SarlCastedExpression,ITypeComputationState)
Compute the type of a casted expression.
Parameters:
cast - the expression.
state - the state of the type resolver.
_computeTypes(SarlContinueExpression,ITypeComputationState)
protected def _computeTypes(SarlContinueExpression,ITypeComputationState)
Compute the type of a break expression.
Parameters:
object - the expression.
state - the state of the type resolver.
Since:
0.7
_computeTypes(XAbstractFeatureCall,ITypeComputationState)
protected def _computeTypes(XAbstractFeatureCall,ITypeComputationState)
computeTypes(XExpression,ITypeComputationState)
def computeTypes(XExpression,ITypeComputationState)
getBestCandidate(List<E>)
protected def getBestCandidate(List<E>) : org.eclipse.xtext.xbase.typesystem.computation.ILinkingCandidate
isIgnorableCallToFeature(ILinkingCandidate)
protected def isIgnorableCallToFeature(ILinkingCandidate) : boolean
Replies if ambiguity could be removed for the given feature.
Parameters:
candidate - the candidate.
Returns:
true if ambiguity could be removed.