Ejemplo n.º 1
0
        private static void SwitcherCommand(string source, TypeCommand command)
        {
            switch (command)
            {
            case TypeCommand.DUMP_TOKENS:
                Lexer.StartLexer(source);
                Lexer.ParseLexem();
                Lexer.ViewTokens();
                break;

            case TypeCommand.DUMP_AST:
                Lexer.StartLexer(source);
                AbstractSyntaxTree.CreateAST(true, true);
                break;

            case TypeCommand.DUMP_ASM:
                Lexer.StartLexer(source);
                AbstractSyntaxTree.CreateAST(true, true);
                ASM.CreateASM();
                ASM.RunCompileProgramm();
                break;
            }
        }