Class MarkKeepsParameter

java.lang.Object
org.ek9lang.compiler.support.retention.MarkKeepsParameter
All Implemented Interfaces:
BiConsumer<ScopedSymbol, org.ek9lang.tooling.construct.RetentionRule>

public final class MarkKeepsParameter extends Object implements BiConsumer<ScopedSymbol, org.ek9lang.tooling.construct.RetentionRule>
Record, on a user method, operator or function, that the argument given for a parameter may be kept beyond the call - the rule <destination> <- <parameter> (RetentionRule.destination() and RetentionRule.source()), exactly the text a built-in declares: the destination is receiver (stored in a property of the object), another parameter's name (added to the object that argument refers to), ambient (held where nothing here can name it: a capture, a returned closure, a call that keeps it) or ReturnRetention.UNIMPLEMENTED. Derived by phase5/CloseableArgumentKeeping, read by KeepsArgumentBeyondResult and DefinitelyKeepsArgument.
  • Constructor Details

    • MarkKeepsParameter

      public MarkKeepsParameter()
  • Method Details

    • accept

      public void accept(ScopedSymbol callable, org.ek9lang.tooling.construct.RetentionRule keep)
      Specified by:
      accept in interface BiConsumer<ScopedSymbol, org.ek9lang.tooling.construct.RetentionRule>