Class CapturedCopy

java.lang.Object
org.ek9lang.compiler.support.CapturedCopy
All Implemented Interfaces:
BiFunction<Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, EK9Parser.ExpressionParamContext, Optional<ISymbol>>

public final class CapturedCopy extends Object implements BiFunction<Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, EK9Parser.ExpressionParamContext, Optional<ISymbol>>
THE copy a dynamic function or class makes from one argument of its capture list (CaptureAliases follows these). Was RecordedSymbols.capturedCopy (no-statics lane S3, 2026-10-29).
  • Constructor Details

    • CapturedCopy

      public CapturedCopy()
  • Method Details

    • apply

      public Optional<ISymbol> apply(Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded, EK9Parser.ExpressionParamContext param)
      The copy a dynamic function or class makes from one argument of its capture list - (acc) and (total: acc) both make a copy, named acc and total - which shares the object the argument refers to. Empty when param is not a capture argument or no copy is recorded.
      Specified by:
      apply in interface BiFunction<Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, EK9Parser.ExpressionParamContext, Optional<ISymbol>>
      Parameters:
      recorded - the recorded-symbol lookup of the phase asking (symbolsAndScopes or parsedModule)
      param - one argument of a capture list