4 #include <fridh/lexer.hpp>
5 #include <ail/file.hpp>
6 #include <fridh/interpreter.hpp>
8 bool perform_lexer_test(std::string
const & input
, std::string
const & output
)
11 if(!ail::read_file(input
, code
))
13 std::cout
<< "Unable to read input" << std::endl
;
17 std::vector
<fridh::line_of_code
> lines
;
19 fridh::lexer
lexer(code
, lines
);
22 std::cout
<< "Error: " << error
<< std::endl
;
26 ail::write_file(output
, fridh::visualise_lexemes(lines
));
30 int main(int argc
, char ** argv
)
34 std::cout
<< argv
[0] << " <input> <output>" << std::endl
;
38 perform_lexer_test(argv
[1], argv
[2]);