Package org.ek9lang.compiler.phase5
Class AcceptableConstructComplexityOrError
java.lang.Object
org.ek9lang.compiler.phase5.AcceptableConstructComplexityOrError
- All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>
class AcceptableConstructComplexityOrError
extends Object
implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
Looks for the complexity value in the complexityCounter and adds the value to the
appropriate symbol. But also if there is a valid stack above the current value adds
the complexity to that. This is so that classes have the total of all the method complexity.
In this way if there is a very large number of methods (even with moderate complexity) the
total complexity should trigger an error and cause the developer to break the class up.
-
Constructor Summary
ConstructorDescriptionAcceptableConstructComplexityOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, ComplexityCounter complexityCounter) -
Method Summary
-
Constructor Details
-
AcceptableConstructComplexityOrError
AcceptableConstructComplexityOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, ComplexityCounter complexityCounter)
-
-
Method Details