예제 #1
0
        public SymbolBinding GetMethod(string name)
        {
            if (!_moduleCtx.TryGetMethod(name, out var sb))
            {
                return(_outerCtx.GetMethod(name));
            }

            ShiftIndex(ref sb);
            return(sb);
        }
예제 #2
0
        public SymbolBinding GetMethod(string name)
        {
            try
            {
                var sb = _moduleCtx.GetMethod(name);
                ShiftIndex(ref sb);

                return(sb);
            }
            catch (SymbolNotFoundException)
            {
                return(_outerCtx.GetMethod(name));
            }
        }