Class MeasuredComplexityRecorder

java.lang.Object
org.ek9lang.compiler.support.MeasuredComplexityRecorder
All Implemented Interfaces:
ObjIntConsumer<ISymbol>

public final class MeasuredComplexityRecorder extends Object implements ObjIntConsumer<ISymbol>
THE writer of a measured CommonValues.COMPLEXITY for a symbol that phase 5 will never visit; its tolerant reader is MeasuredComplexity.

Use ONLY for synthesised constructs, and say in the caller why the number is what it is. Anything with a parse tree must be measured by phase 5, not stamped here.

  • Constructor Details

    • MeasuredComplexityRecorder

      public MeasuredComplexityRecorder()
  • Method Details

    • accept

      public void accept(ISymbol symbol, int complexity)
      Record a complexity against a symbol that phase 5 will never visit.
      Specified by:
      accept in interface ObjIntConsumer<ISymbol>