Class ConstructStatementBudget

java.lang.Object
org.ek9lang.compiler.phase5.ConstructStatementBudget

final class ConstructStatementBudget extends Object
The per-construct statement budget and human-readable construct label, keyed off the symbol kind. Shared by AcceptableStatementCountOrError (which enforces the budget) and AcceptableCombinedComplexitySizeOrError (which normalises its size ratio against the same budget and labels the construct in its diagnostic) so the two stay in lock-step.
  • Method Details

    • maxStatementsFor

      static int maxStatementsFor(ISymbol symbol)
      Maximum number of statements permitted for the construct the given symbol represents.
    • displayNameFor

      static String displayNameFor(ISymbol symbol)
      Human-readable label for the construct the given symbol represents, for use in diagnostics.