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

Unified Diff: tools/lexer_generator/code_generator.jinja

Issue 98843002: Experimental parser: set start_ properly after illegal token. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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 | « test/lexer/utf-2.js ('k') | no next file » | 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 be3a700e63bfd2425cca4401bec6d8d15e906a1b..d029e2ad9367911309c98874b6fae3418e21843d 100644
--- a/tools/lexer_generator/code_generator.jinja
+++ b/tools/lexer_generator/code_generator.jinja
@@ -173,7 +173,7 @@
{%- endif %}
{% if debug_print %}
- fprintf(stderr, "state {{state.node_number}}\n");
+ fprintf(stderr, "state {{state.node_number}}, start %d, cursor %d\n", start_ - buffer_, cursor_ - buffer_);
{% endif -%}
{%- set entry_action = state.entry_action -%}
@@ -262,6 +262,7 @@
PREPARE_TOKEN(); \
FORWARD(); \
next_.token = T; \
+ start_ = cursor_; \
return; \
}
« no previous file with comments | « test/lexer/utf-2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698