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

Unified Diff: tools/lexer_generator/code_generator.jinja

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gyp/v8.gyp ('k') | tools/merge-to-branch.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/code_generator.jinja
diff --git a/tools/lexer_generator/code_generator.jinja b/tools/lexer_generator/code_generator.jinja
index 6c4e4049a817f3461c2c3a641b81299a5b0fab74..b3ace18bee63ca613da724d58e82804c8593fa29 100644
--- a/tools/lexer_generator/code_generator.jinja
+++ b/tools/lexer_generator/code_generator.jinja
@@ -88,10 +88,14 @@
stored_token = Token::{{args[2]}};
}
{% elif type == 'check_escaped_identifier_start' %}
- if (!ValidIdentifierStart()) goto default_action;
+ if (!unicode_cache_->IsIdentifierStart(ScanHexNumber(4))) {
+ goto default_action;
+ }
next_.has_escapes = true;
{% elif type == 'check_escaped_identifier_part' %}
- if (!ValidIdentifierPart()) goto default_action;
+ if (!unicode_cache_->IsIdentifierPart(ScanHexNumber(4))) {
+ goto default_action;
+ }
next_.has_escapes = true;
{% elif type == 'if_line_terminator_backtrack' %}
if (!has_line_terminator_before_next_) {
@@ -299,7 +303,7 @@
{%- endmacro %}
-#include "lexer/experimental-scanner.h"
+#include "lexer/lexer.h"
#define RESET_START() { \
start_ = cursor_; \
@@ -343,10 +347,11 @@
#define CRASH() { }
#endif
+
namespace v8 {
namespace internal {
template<>
-void ExperimentalScanner<{{char_type}}>::Scan() {
+void Lexer<{{char_type}}>::Scan() {
// Setup environment.
next_.has_escapes = false;
« no previous file with comments | « tools/gyp/v8.gyp ('k') | tools/merge-to-branch.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698