Class ContainerChangedBetween

java.lang.Object
org.ek9lang.compiler.phase5.ContainerChangedBetween

final class ContainerChangedBetween extends Object
THE look-ahead of the safe-access proofs (E08030): may anything in a region of source - read AHEAD of the walk - change the object a proven Optional / Result / Iterator refers to (ProvenContainerChange)? Use this for any proof that must judge code it has not walked yet; never a private scan. The two places a proof must look ahead: a loop body, any of which may run before an access on the next pass (anywhereIn(ParseTree, ISymbol)), and the rest of a condition after the conjunct that proves it (if name? and forget(name), name? and forget(name) and name.get() > 0 - between(ParseTree, ISymbol, int, int)). Read ahead, a name made to share the object counts as a change (its own later changes are not yet known to be the object's). The places code of the program's own runs are ProgramCodeSites' - the same the walk is told of.
  • Constructor Details

  • Method Details

    • anywhereIn

      boolean anywhereIn(org.antlr.v4.runtime.tree.ParseTree region, ISymbol container)
      May anything in region change container's object.
    • between

      boolean between(org.antlr.v4.runtime.tree.ParseTree region, ISymbol container, int afterToken, int beforeToken)
      May anything in region that starts strictly after token afterToken and strictly before token beforeToken change container's object.