// Traverses the tree and generates output code
        public void Generate(CilEmitter emitter)
        {
            emitter.BeginProgram();

            ILabel begin = emitter.GenerateLabel();
            ILabel end   = emitter.GenerateLabel();

            begin.Emit();
            root.Generate(emitter, begin, end);
            end.Emit();

            emitter.WriteExecutable();
        }