예제 #1
0
        private static Item Deref(SymbolSpace space, SymbolItem symbol)
        {
            var reference = space.Lookup(symbol.Name);

            return(reference is EvaluateableItem
                                ? (reference as EvaluateableItem).Quote()
                                : reference);
        }
예제 #2
0
        public Item Flatten(SymbolSpace space)
        {
            var current = space.Lookup(this.Name);

            while (current.ItemType == ItemType.Symbol)
            {
                var symbol = (SymbolItem)current;

                if (symbol.IsQuoted)
                {
                    break;
                }

                current = symbol.Evaluate(space);
            }

            return(current);
        }