Exemplo n.º 1
0
        public VariableBinding GetVariable(string name)
        {
            if (!_moduleCtx.TryGetVariable(name, out var vb))
            {
                return(_outerCtx.GetVariable(name));
            }

            ShiftIndex(ref vb.binding);
            return(vb);
        }
Exemplo n.º 2
0
        public bool TryGetVariable(string name, out VariableBinding binding)
        {
            if (!_moduleCtx.TryGetVariable(name, out binding))
            {
                return(_outerCtx.TryGetVariable(name, out binding));
            }

            ShiftIndex(ref binding.binding);
            return(true);
        }