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

Side by Side Diff: src/token.h

Issue 9352013: Extend scanner with new Harmony module keywords (under flag). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/scanner.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 T(NUMBER, NULL, 0) \ 163 T(NUMBER, NULL, 0) \
164 T(STRING, NULL, 0) \ 164 T(STRING, NULL, 0) \
165 \ 165 \
166 /* Identifiers (not keywords or future reserved words). */ \ 166 /* Identifiers (not keywords or future reserved words). */ \
167 T(IDENTIFIER, NULL, 0) \ 167 T(IDENTIFIER, NULL, 0) \
168 \ 168 \
169 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \ 169 /* Future reserved words (ECMA-262, section 7.6.1.2). */ \
170 T(FUTURE_RESERVED_WORD, NULL, 0) \ 170 T(FUTURE_RESERVED_WORD, NULL, 0) \
171 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \ 171 T(FUTURE_STRICT_RESERVED_WORD, NULL, 0) \
172 K(CONST, "const", 0) \ 172 K(CONST, "const", 0) \
173 K(EXPORT, "export", 0) \
174 K(IMPORT, "import", 0) \
173 K(LET, "let", 0) \ 175 K(LET, "let", 0) \
176 K(MODULE, "module", 0) \
174 \ 177 \
175 /* Illegal token - not able to scan. */ \ 178 /* Illegal token - not able to scan. */ \
176 T(ILLEGAL, "ILLEGAL", 0) \ 179 T(ILLEGAL, "ILLEGAL", 0) \
177 \ 180 \
178 /* Scanner-internal use only. */ \ 181 /* Scanner-internal use only. */ \
179 T(WHITESPACE, NULL, 0) 182 T(WHITESPACE, NULL, 0)
180 183
181 184
182 class Token { 185 class Token {
183 public: 186 public:
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 private: 288 private:
286 static const char* const name_[NUM_TOKENS]; 289 static const char* const name_[NUM_TOKENS];
287 static const char* const string_[NUM_TOKENS]; 290 static const char* const string_[NUM_TOKENS];
288 static const int8_t precedence_[NUM_TOKENS]; 291 static const int8_t precedence_[NUM_TOKENS];
289 static const char token_type[NUM_TOKENS]; 292 static const char token_type[NUM_TOKENS];
290 }; 293 };
291 294
292 } } // namespace v8::internal 295 } } // namespace v8::internal
293 296
294 #endif // V8_TOKEN_H_ 297 #endif // V8_TOKEN_H_
OLDNEW
« no previous file with comments | « src/scanner.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698