Class AcceptableStatementCountOrError

java.lang.Object
org.ek9lang.compiler.phase5.AcceptableStatementCountOrError
All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>

class AcceptableStatementCountOrError extends Object implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
Checks statement count at function/method/operator exit and emits error if too many. Long functions are hard to read and maintain - this enforces NCSS (Non-Commenting Source Statement) limits that force developers to extract functions rather than writing excessively long methods.
  • Constructor Details

  • Method Details

    • accept

      public void accept(org.antlr.v4.runtime.tree.ParseTree node)
      Specified by:
      accept in interface Consumer<org.antlr.v4.runtime.tree.ParseTree>