io.sarl.lang.validation
Class SARLEarlyExitValidator
All Superinterfaces:
org.eclipse.emf.ecore.EValidator, org.eclipse.xtext.validation.ValidationMessageAcceptor
@javax.inject.Singleton
class SARLEarlyExitValidator
extends java.lang.Object
Validation of the early-exit control flow.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Constructor Summary
Constructor and description
new
Action Summary
Modifier and type Action and description
void checkDeadCode(XBlockExpression)
.
protected void collectExits(EObject,List<E>)
protected org.eclipse.xtext.validation.IssueSeverities getIssueSeverities(Map<K,V>,EObject)
Constructor Details
new
new
Action Details
checkDeadCode(XBlockExpression)
def checkDeadCode(XBlockExpression)
.

This function is overriden for:
  • The XAbstractFeatureCall statements are not considered as potential early exit causes. in the super function. We need to mark the dead code for the XAbstractFeatureCall statements which refer to a function with the io.sarl.lang.core.annotation.EarlyExit annotation.
  • Mark as dead the code after a "break" statement.
collectExits(EObject,List<E>)
protected def collectExits(EObject,List<E>)
getIssueSeverities(Map<K,V>,EObject)
protected def getIssueSeverities(Map<K,V>,EObject) : org.eclipse.xtext.validation.IssueSeverities