From 93c04efc9597ef15aaccc5b71db0a7d7239fefa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 6 Dec 2008 17:53:30 +0000 Subject: [PATCH] tokenize: "~Base" should generate two tokens. "~" and "Base" --- tokenize.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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();