Class ProcessingBodyPresent
java.lang.Object
org.ek9lang.compiler.common.ProcessingBodyPresent
- All Implemented Interfaces:
Predicate<EK9Parser.OperationDetailsContext>
public class ProcessingBodyPresent
extends Object
implements Predicate<EK9Parser.OperationDetailsContext>
Checks in the context to see if a returning variableDeclaration or a body is defined.
If that is the case then there will be some processing in the function/method.
Other checks will ensure that the return value (if present is set).
This is THE rule for "does this operation have an implementation?" - the compiler's E07110/E07160 checks and the editors that predict them (ek9_remove_statements refusing a range that empties a body) both read it here, so the prediction cannot drift from the compiler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTrue when the operation's returning variable is initialised in its declaration (<- rtn as Integer: 0), which on its own is an implementation: such an operation may have no statements at all.boolean
-
Constructor Details
-
ProcessingBodyPresent
public ProcessingBodyPresent()
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<EK9Parser.OperationDetailsContext>
-
returnIsTheBody
True when the operation's returning variable is initialised in its declaration (<- rtn as Integer: 0), which on its own is an implementation: such an operation may have no statements at all.
-