예제 #1
0
        public override Expression Compile()
        {
            var left  = LeftNode.Accept(Compiler);
            var right = RightNode.Accept(Compiler);

            return(CompilerUtils.NewArray(left, right));
        }
예제 #2
0
        public override Expression Compile()
        {
            if (Node.List.Count == 0)
            {
                return(Array.Expressions.New());
            }

            var words    = new List <Expression>();
            var contents = new List <Expression>();

            foreach (var child in Node)
            {
                if (child.Token.Type == tSPACE)
                {
                    var word = CreateWord(contents);
                    words.Add(word);
                    contents = new List <Expression>();
                    continue;
                }

                var content = child.Accept(Compiler);
                contents.Add(content);
            }

            return(CompilerUtils.NewArray(words.ToArray()));
        }
예제 #3
0
        public override Expression Compile()
        {
            var left  = LeftNode.Accept(Compiler);
            var right = RightNode.Accept(Compiler);

            left = ConvertToSymbol(left);
            return(CompilerUtils.NewArray(left.Cast <iObject>(), right));
        }
예제 #4
0
        public override Expression Compile()
        {
            var left = Label;

            left = left.Remove(left.Length - 1);

            var label = Constant(new Symbol(left), typeof(iObject));
            var value = Value.Accept(Compiler);

            return(CompilerUtils.NewArray(label, value));
        }
예제 #5
0
        public override Expression Compile()
        {
            var elements = Node.Select(_ => _.Accept(Compiler));

            return(CompilerUtils.NewArray(elements.ToArray()));
        }