diff --git a/tokenize.cpp b/tokenize.cpp index 294ddab26..a47db7c00 100644 --- a/tokenize.cpp +++ b/tokenize.cpp @@ -454,7 +454,10 @@ void Tokenizer::tokenizeCode(std::istream &code, const unsigned int FileIndex) do { // Append token.. - CurrentToken += c; + CurrentToken += c; + + if ( c == '\n' ) + ++lineno; // Special sequence '\.' if (special) @@ -472,7 +475,7 @@ void Tokenizer::tokenizeCode(std::istream &code, const unsigned int FileIndex) continue; } - if (strchr("+-*/%&|^?!=<>[](){};:,.",ch)) + if (strchr("+-*/%&|^?!=<>[](){};:,.~",ch)) { addtoken(CurrentToken.c_str(), lineno, FileIndex); CurrentToken.clear();