Index: src/scanner.cc |
diff --git a/src/scanner.cc b/src/scanner.cc |
index 8062faa2447403af9354c1304200401521ebb123..8fd1077bbf29125b6b569519bc65ea363ed89080 100644 |
--- a/src/scanner.cc |
+++ b/src/scanner.cc |
@@ -245,6 +245,8 @@ bool Scanner::SkipWhiteSpace() { |
while (true) { |
while (true) { |
+ // The unicode cache accepts unsigned inputs. |
+ if (c0_ < 0) break; |
Sven Panne
2014/11/05 09:11:49
How is this related to the bitfield fiddling?
Jakob Kummerow
2014/11/05 12:13:46
As the comment says, the unicode_cache_ only accep
|
// Advance as long as character is a WhiteSpace or LineTerminator. |
// Remember if the latter is the case. |
if (unicode_cache_->IsLineTerminator(c0_)) { |
@@ -625,14 +627,14 @@ void Scanner::Scan() { |
break; |
default: |
- if (unicode_cache_->IsIdentifierStart(c0_)) { |
+ if (c0_ < 0) { |
+ token = Token::EOS; |
Sven Panne
2014/11/05 09:11:49
Same here...
|
+ } else if (unicode_cache_->IsIdentifierStart(c0_)) { |
token = ScanIdentifierOrKeyword(); |
} else if (IsDecimalDigit(c0_)) { |
token = ScanNumber(false); |
} else if (SkipWhiteSpace()) { |
token = Token::WHITESPACE; |
- } else if (c0_ < 0) { |
- token = Token::EOS; |
} else { |
token = Select(Token::ILLEGAL); |
} |