Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Unified Diff: src/parsing/scanner.cc

Issue 2329703002: Private fields
Patch Set: some comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/preparser.cc ('k') | src/parsing/token.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner.cc
diff --git a/src/parsing/scanner.cc b/src/parsing/scanner.cc
index 7ce84d1f21f582c3580cc5afe848c33443f67ad7..28b8fe5984f36948a3395419c5d3f367a3bd258a 100644
--- a/src/parsing/scanner.cc
+++ b/src/parsing/scanner.cc
@@ -107,6 +107,7 @@ uc32 Scanner::ScanUnlimitedLengthHexNumber(int max_value, int beg_pos) {
STATIC_ASSERT(Token::NUM_TOKENS <= 0x100);
// Table of one-character tokens, by character (0x00..0x7f only).
+// clang-format off
static const byte one_char_tokens[] = {
Token::ILLEGAL,
Token::ILLEGAL,
@@ -143,7 +144,7 @@ static const byte one_char_tokens[] = {
Token::ILLEGAL,
Token::ILLEGAL,
Token::ILLEGAL,
- Token::ILLEGAL,
+ Token::HASH, // 0x23
Token::ILLEGAL,
Token::ILLEGAL,
Token::ILLEGAL,
@@ -237,7 +238,7 @@ static const byte one_char_tokens[] = {
Token::BIT_NOT, // 0x7e
Token::ILLEGAL
};
-
+// clang-format on
Token::Value Scanner::Next() {
if (next_.token == Token::EOS) {
@@ -711,6 +712,10 @@ void Scanner::Scan() {
token = Select(Token::BIT_NOT);
break;
+ case '#':
+ token = Select(Token::HASH);
+ break;
+
case '`':
token = ScanTemplateStart();
break;
« no previous file with comments | « src/parsing/preparser.cc ('k') | src/parsing/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698