Index: src/parsing/scanner.cc |
diff --git a/src/parsing/scanner.cc b/src/parsing/scanner.cc |
index 6a9b32e63461f3b12e334546d8b94db6c48d49d7..03522767cd90e3b2391769f565a997168e04eb35 100644 |
--- a/src/parsing/scanner.cc |
+++ b/src/parsing/scanner.cc |
@@ -839,9 +839,6 @@ uc32 Scanner::ScanOctalEscape(uc32 c, int length) { |
} |
-const int kMaxAscii = 127; |
- |
- |
Token::Value Scanner::ScanString() { |
uc32 quote = c0_; |
Advance<false, false>(); // consume quote |
@@ -858,7 +855,7 @@ Token::Value Scanner::ScanString() { |
Advance<false, false>(); |
return Token::STRING; |
} |
- uc32 c = c0_; |
+ char c = static_cast<char>(c0_); |
if (c == '\\') break; |
Advance<false, false>(); |
AddLiteralChar(c); |
@@ -1283,7 +1280,7 @@ Token::Value Scanner::ScanIdentifierOrKeyword() { |
LiteralScope literal(this); |
if (IsInRange(c0_, 'a', 'z')) { |
do { |
- uc32 first_char = c0_; |
+ char first_char = static_cast<char>(c0_); |
Advance<false, false>(); |
AddLiteralChar(first_char); |
} while (IsInRange(c0_, 'a', 'z')); |
@@ -1291,11 +1288,11 @@ Token::Value Scanner::ScanIdentifierOrKeyword() { |
if (IsDecimalDigit(c0_) || IsInRange(c0_, 'A', 'Z') || c0_ == '_' || |
c0_ == '$') { |
// Identifier starting with lowercase. |
- uc32 first_char = c0_; |
+ char first_char = static_cast<char>(c0_); |
Advance<false, false>(); |
AddLiteralChar(first_char); |
while (IsAsciiIdentifier(c0_)) { |
- uc32 first_char = c0_; |
+ char first_char = static_cast<char>(c0_); |
Advance<false, false>(); |
AddLiteralChar(first_char); |
} |
@@ -1313,7 +1310,7 @@ Token::Value Scanner::ScanIdentifierOrKeyword() { |
HandleLeadSurrogate(); |
} else if (IsInRange(c0_, 'A', 'Z') || c0_ == '_' || c0_ == '$') { |
do { |
- uc32 first_char = c0_; |
+ char first_char = static_cast<char>(c0_); |
Advance<false, false>(); |
AddLiteralChar(first_char); |
} while (IsAsciiIdentifier(c0_)); |