Class PropertyOfThis

java.lang.Object
org.ek9lang.compiler.support.sharing.PropertyOfThis
All Implemented Interfaces:
BiFunction<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, ISymbol>

final class PropertyOfThis extends Object implements BiFunction<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, ISymbol>
THE reading of a property named THROUGH this where a store or a call chain reaches it (Q2, lane B2, 2026-11-13): the single step this.F as a store target (this.F := p, this.F += p) and this.F as the start of a call chain (this.F.add(p)) - the same property the bare F names, so RetainedBy reads both spellings as ObjectSharing.Kind.KEPT_IN_PROPERTY (the two must never be judged differently, as CallableParameterOccurrences.acceptOwnProperty already insists for a property read). Over PropertyAccessedDirectly, THE parse half of "own property" (PropertyAccessedDirectly.THIS_RECEIVER). Null for anything else - a chain through a parameter, a local, a call result or a further property reaches an object this reading does not follow, which stays ObjectSharing.Kind.ESCAPES. Hold one.
  • Constructor Details

    • PropertyOfThis

      PropertyOfThis()
  • Method Details

    • apply

      public ISymbol apply(org.antlr.v4.runtime.tree.ParseTree node, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded)
      The property this.F names when node is exactly that single step; null otherwise.
      Specified by:
      apply in interface BiFunction<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, ISymbol>
    • startOf

      ISymbol startOf(EK9Parser.ObjectAccessExpressionContext chain, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded)
      The property a call chain starts on through this - this.F.add(p)'s F, whatever follows it; null when the chain starts anywhere else or its first step is a call.