Home | History | Annotate | Download | only in env

Lines Matching defs:env

17 package com.google.turbine.binder.env;
21 /** An {@link Env} that chains two existing envs together. */
22 public class CompoundEnv<S extends Symbol, V> implements Env<S, V> {
24 private final Env<S, ? extends V> base;
25 private final Env<S, ? extends V> env;
27 private CompoundEnv(Env<S, ? extends V> base, Env<S, ? extends V> env) {
29 this.env = env;
34 V result = env.get(sym);
41 /** A chainable compound env with a single entry. */
42 public static <S extends Symbol, V> CompoundEnv<S, V> of(Env<S, ? extends V> env) {
43 return new CompoundEnv<>(null, env);
46 /** Adds an env to the chain. */
47 public CompoundEnv<S, V> append(Env<S, ? extends V> env) {
48 return new CompoundEnv<>(this, env);