internal IParserNode ConstructTypeEmitterInstance(out LocalVariableNode variable)
        {
            var variableDef = new VariableDefinition(typeEmitter.Get(assemblyEmitter));

            variable = new LocalVariableNode(variableDef);

            return(new SymbolDeclarationNode()
            {
                Variable = variableDef,
                Initializer = ConstructTypeEmitterInstance()
            });
        }
        internal ICodeBlockNode OutputEnumerable(IExpressionNode enumerable)
        {
            var enumerator = new LocalVariableNode(new VariableDefinition(ienumerator));
            var counter    = new LocalVariableNode(new VariableDefinition(assemblyEmitter.TypeSystem.Int32));

            return(new CodeBlockNode()
            {
                Nodes = new IParserNode[]
                {
                    new SymbolDeclarationNode()
                    {
                        Variable = counter.LocalVariable,
                        Initializer = new LiteralNode(assemblyEmitter.TypeSystem.Int32, 0)
                    },
                    new SymbolDeclarationNode()
                    {
                        Variable = enumerator.LocalVariable,
                        Initializer = new MethodCallNode()
                        {
                            Function = new FunctionNode()
                            {
                                ObjectInstance = enumerable,
                                Method = ienumerableGetEnumerator
                            },
                            Args = new IExpressionNode[0]
                        }
                    },
                    new WhileBlockNode()
                    {
                        Condition = new MethodCallNode()
                        {
                            Function = new FunctionNode()
                            {
                                ObjectInstance = enumerator,
                                Method = ienumeratorMoveNext
                            },
                            Args = new IExpressionNode[0]
                        },
                        ExecutedBlock = new CodeBlockNode()
                        {
                            Nodes = new IParserNode[]
                            {
                                new MethodCallNode()
                                {
                                    Function = new FunctionNode()
                                    {
                                        Method = consoleWriteString
                                    },
                                    Args = new IExpressionNode[]
                                    {
                                        new BinaryOperatorNode()
                                        {
                                            ExpressionReturnType = assemblyEmitter.TypeSystem.String,
                                            BinaryOperatorType = BinaryOperatorNodeType.Addition,
                                            LeftOperand = new MethodCallNode()
                                            {
                                                Function = new FunctionNode()
                                                {
                                                    ObjectInstance = enumerator,
                                                    Method = ienumeratorGetCurrent
                                                },
                                                Args = new IExpressionNode[0]
                                            },
                                            RightOperand = new LiteralNode(assemblyEmitter.TypeSystem.String, " ")
                                        }
                                    }
                                },
                                new IncrementDecrementOperatorNode()
                                {
                                    IncrementDecrementType = IncrementDecrementOperatorType.PreIncrement,
                                    Operand = counter
                                }
                            }
                        }
                    },
                    CallConsoleWriteLine(new LiteralNode(assemblyEmitter.TypeSystem.String, "")),
                    CallConsoleWriteLine(new LiteralNode(assemblyEmitter.TypeSystem.String, "Total count: {0}."), counter)
                }
            });
        }