Class AcceptableNestingDepthOrError
java.lang.Object
org.ek9lang.compiler.phase5.AcceptableNestingDepthOrError
- All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>
class AcceptableNestingDepthOrError
extends Object
implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
Checks nesting depth at function/method/operator exit and emits error if too deep.
Deep nesting makes code hard to read and maintain - this enforces a reasonable limit.
The limit applies to control structures: if, while, for, switch, try/catch/finally.
-
Constructor Summary
ConstructorsConstructorDescriptionAcceptableNestingDepthOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, NestingDepthCounter nestingCounter) -
Method Summary
-
Constructor Details
-
AcceptableNestingDepthOrError
AcceptableNestingDepthOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, NestingDepthCounter nestingCounter)
-
-
Method Details
-
accept
-