private object lookupVariable(Token name, Expr expr)
        {
            if (locals.ContainsKey(expr))
            {
                return(environment.getAt(locals[expr], name.lexeme));
            }

            return(globals.get(name));
        }
        public object get(Token name)
        {
            if (values.ContainsKey(name.lexeme))
            {
                return(values[name.lexeme]);
            }

            if (enclosing != null)
            {
                return(enclosing.get(name));
            }

            throw new RuntimeError(name, $"Undefined variable '{name.lexeme}'.");
        }