Class StatementCounter
java.lang.Object
org.ek9lang.compiler.phase5.IntScopeCounter
org.ek9lang.compiler.phase5.StatementCounter
Tracks statement counts within functions/methods/operators.
Increments on each executable statement encountered during AST traversal.
This is used to enforce NCSS (Non-Commenting Source Statement) limits,
preventing overly long functions that become hard to read and maintain.
A statement is always encountered inside an open scope, so incrementCount() asserts that
invariant rather than silently ignoring an out-of-scope increment.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidIncrement the statement count for the current scope.Methods inherited from class IntScopeCounter
incrementInnermost, isNotEmpty, popScope, pushScope
-
Constructor Details
-
StatementCounter
StatementCounter()
-
-
Method Details
-
incrementCount
void incrementCount()Increment the statement count for the current scope. Called when encountering an executable statement.
-