Class MayBeObjectFromOutside

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

public final class MayBeObjectFromOutside extends Object implements BiPredicate<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>
May the value given to a name be, or hold, an object from OUTSIDE the code being analysed (D66) that the name is not recorded as sharing with: this - itself, or held by a list, a Dict, a constructor's or call's arguments or a dynamic function's or class's capture list (box <- Box(this)) - or a result a call, a coalescing operator or a ternary hands back that may be an existing object. A plain variable is not asked here - alias <- base is ObjectSharing.Kind.SHARED, so the alias is outside exactly when base is. The value is the right-hand side of a declaration or store (an assignmentExpression's content).
  • Constructor Details

    • MayBeObjectFromOutside

      public MayBeObjectFromOutside()
  • Method Details

    • test

      public boolean test(org.antlr.v4.runtime.tree.ParseTree value, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded)
      Specified by:
      test in interface BiPredicate<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>