diff options
author | John Hodge <tpg@mutabah.net> | 2016-01-30 21:59:16 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-01-30 21:59:16 +0800 |
commit | 0b8f4dfa88d392ab188c3ee85e1afe1e3658cca5 (patch) | |
tree | f3046716b75c64d263a6826c54c801c7105ecf44 /src/parse/lex.cpp | |
parent | 3cb317bdb5be06ea0c4ccad8ecb5bb21b74509cc (diff) | |
download | mrust-0b8f4dfa88d392ab188c3ee85e1afe1e3658cca5.tar.gz |
Better pretty printing, updated resolution logic
Diffstat (limited to 'src/parse/lex.cpp')
-rw-r--r-- | src/parse/lex.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp index 9855e3c0..a3187cda 100644 --- a/src/parse/lex.cpp +++ b/src/parse/lex.cpp @@ -180,8 +180,6 @@ signed int Lexer::getSymbol() const char* const chars = TOKENMAP[i].chars; const size_t len = TOKENMAP[i].len; - //::std::cout << "ofs=" << ofs << ", chars[ofs] = " << chars[ofs] << ", ch = " << ch << ", len = " << len << ::std::endl; - if( ofs >= len || chars[ofs] > ch ) { this->ungetc(); return best; @@ -370,6 +368,7 @@ Token Lexer::getTokenInt() // Single dot else if( !isdigit(ch) ) { + this->ungetc(); this->m_next_token = Token(TOK_DOT); return Token(val, CORETYPE_ANY); } |