diff --git a/langkit/langkit_lexer.cpp b/langkit/langkit_lexer.cpp index af60ffb..62815a6 100644 --- a/langkit/langkit_lexer.cpp +++ b/langkit/langkit_lexer.cpp @@ -56,7 +56,6 @@ std::vector Lexer::lex(const std::string &input, const char *filename) input_iter += comment_end.size(); ++current_line; current_col = 0; - break; } boost::match_results eoc_delim; if (regex_search(input_iter, input_end, eoc_delim, multiline_comment_end_pattern.regex, boost::match_continuous)) { @@ -68,6 +67,7 @@ std::vector Lexer::lex(const std::string &input, const char *filename) } if ((!found_eoc) && (input_iter != input_end)) { ++input_iter; + current_col += 1; } } diff --git a/langkit/main.cpp b/langkit/main.cpp index 7802e85..8c40dc8 100644 --- a/langkit/main.cpp +++ b/langkit/main.cpp @@ -118,7 +118,6 @@ void parse(std::vector &tokens, const char *filename) { } */ - if (results.second) { std::cout << "Parse successful: " << std::endl; debug_print(parent, ""); @@ -127,7 +126,6 @@ void parse(std::vector &tokens, const char *filename) { std::cout << "Parse failed: " << std::endl; debug_print(parent, ""); } - } @@ -168,7 +166,7 @@ int main(int argc, char *argv[]) { } else { std::vector tokens = lexer.lex(load_file(argv[1]), argv[1]); + debug_print(tokens); parse(tokens, argv[1]); - //debug_print(tokens); } }