#include "highlighter.h"

#include <iostream>
#include <fstream>

int main(int argc, char** argv) {
    ConsoleHighlighter *highlighter;
    if(argc == 2) {
        std::ifstream in(argv[1]);
        highlighter = new ConsoleHighlighter(in);
    } else {
        highlighter = new ConsoleHighlighter(std::cin);
    }
    highlighter->highlight(std::cout);
    delete highlighter;
    return 0;
}
