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

Side by Side Diff: src/token.h

Issue 663683006: Implement ES6 Template Literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased against https://chromium.googlesource.com/v8/v8.git/master Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_TOKEN_H_ 5 #ifndef V8_TOKEN_H_
6 #define V8_TOKEN_H_ 6 #define V8_TOKEN_H_
7 7
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 K(IMPORT, "import", 0) \ 156 K(IMPORT, "import", 0) \
157 K(LET, "let", 0) \ 157 K(LET, "let", 0) \
158 K(STATIC, "static", 0) \ 158 K(STATIC, "static", 0) \
159 K(YIELD, "yield", 0) \ 159 K(YIELD, "yield", 0) \
160 K(SUPER, "super", 0) \ 160 K(SUPER, "super", 0) \
161 \ 161 \
162 /* Illegal token - not able to scan. */ \ 162 /* Illegal token - not able to scan. */ \
163 T(ILLEGAL, "ILLEGAL", 0) \ 163 T(ILLEGAL, "ILLEGAL", 0) \
164 \ 164 \
165 /* Scanner-internal use only. */ \ 165 /* Scanner-internal use only. */ \
166 T(WHITESPACE, NULL, 0) 166 T(WHITESPACE, NULL, 0) \
167 \
168 /* ES6 Template Literals */ \
169 T(TEMPLATE_SPAN, NULL, 0) \
170 T(TEMPLATE_TAIL, NULL, 0)
167 171
168 172
169 class Token { 173 class Token {
170 public: 174 public:
171 // All token values. 175 // All token values.
172 #define T(name, string, precedence) name, 176 #define T(name, string, precedence) name,
173 enum Value { 177 enum Value {
174 TOKEN_LIST(T, T) 178 TOKEN_LIST(T, T)
175 NUM_TOKENS 179 NUM_TOKENS
176 }; 180 };
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 private: 311 private:
308 static const char* const name_[NUM_TOKENS]; 312 static const char* const name_[NUM_TOKENS];
309 static const char* const string_[NUM_TOKENS]; 313 static const char* const string_[NUM_TOKENS];
310 static const int8_t precedence_[NUM_TOKENS]; 314 static const int8_t precedence_[NUM_TOKENS];
311 static const char token_type[NUM_TOKENS]; 315 static const char token_type[NUM_TOKENS];
312 }; 316 };
313 317
314 } } // namespace v8::internal 318 } } // namespace v8::internal
315 319
316 #endif // V8_TOKEN_H_ 320 #endif // V8_TOKEN_H_
OLDNEW
« src/preparser.h ('K') | « src/scanner.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698