diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-08 16:14:15 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-08 16:14:15 +0800 |
commit | 0ab6d527125669ca7a36e5b27ff429c0f402ba77 (patch) | |
tree | 1c7e14e452d563ebbe95acf39f2a7364a3c2d48b /src/parse/preproc.cpp | |
parent | fcec09900f158aa939eb1c96607aaabf4c8171ef (diff) | |
download | mrust-0ab6d527125669ca7a36e5b27ff429c0f402ba77.tar.gz |
Macro parsing, saving, and evaluating
Diffstat (limited to 'src/parse/preproc.cpp')
-rw-r--r-- | src/parse/preproc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/parse/preproc.cpp b/src/parse/preproc.cpp index c8f0aeea..781ea8bc 100644 --- a/src/parse/preproc.cpp +++ b/src/parse/preproc.cpp @@ -25,12 +25,15 @@ Token Preproc::getTokenInt() {
case TOK_NEWLINE:
m_line ++;
+ //DEBUG("m_line = " << m_line << " (NL)");
continue;
case TOK_WHITESPACE:
continue;
case TOK_COMMENT: {
::std::string comment = tok.str();
- m_line += ::std::count(comment.begin(), comment.end(), '\n');
+ unsigned int c = ::std::count(comment.begin(), comment.end(), '\n');
+ m_line += c;
+ //DEBUG("m_line = " << m_line << " (comment w/ "<<c<<")");
continue; }
default:
return tok;
|