Class EvalEnvs.SubEvalEnv

java.lang.Object
net.hydromatic.morel.eval.EvalEnvs.SubEvalEnv
All Implemented Interfaces:
EvalEnv
Direct Known Subclasses:
EvalEnvs.MutableSubEvalEnv
Enclosing class:
EvalEnvs

static class EvalEnvs.SubEvalEnv extends Object implements EvalEnv
Evaluation environment that inherits from a parent environment and adds one binding.
  • Field Details

    • parentEnv

      protected final EvalEnv parentEnv
    • name

      protected final String name
    • value

      protected Object value
  • Constructor Details

  • Method Details

    • visit

      public void visit(BiConsumer<String,Object> consumer)
      Description copied from interface: EvalEnv
      Visits every variable binding in this environment.

      Bindings that are obscured by more recent bindings of the same name are visited, but after the more obscuring bindings.

      Specified by:
      visit in interface EvalEnv
    • getOpt

      public Object getOpt(String name)
      Description copied from interface: EvalEnv
      Returns the binding of name if bound, null if not.
      Specified by:
      getOpt in interface EvalEnv