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

Unified Diff: src/lexer/even-more-experimental-scanner.h

Issue 71303005: Experimental parser: add back last re2c rules (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/lexer/even-more-experimental-scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/even-more-experimental-scanner.h
diff --git a/src/lexer/even-more-experimental-scanner.h b/src/lexer/even-more-experimental-scanner.h
index fa60f103aa21d89e6e566e361a9efb872bf6eea0..d46a9cebd469c7aed93eb5115778031485daffe4 100644
--- a/src/lexer/even-more-experimental-scanner.h
+++ b/src/lexer/even-more-experimental-scanner.h
@@ -34,10 +34,21 @@
#define YYCTYPE uint8_t
-#define PUSH_TOKEN(T) { send(T); start_ = cursor_; }
-#define PUSH_LINE_TERMINATOR(s) { start_ = cursor_; }
-#define FORWARD() { yych = *(++cursor_); }
-#define SKIP() { start_ = cursor_; }
+#define PUSH_TOKEN(T) { \
+ send(T); \
+ start_ = cursor_; \
+ just_seen_line_terminator_ = false; \
+}
+#define PUSH_LINE_TERMINATOR(s) { \
+ start_ = cursor_; \
+ just_seen_line_terminator_ = true; \
+}
+#define FORWARD() { \
+ yych = *(++cursor_); \
+}
+#define SKIP() { \
+ start_ = cursor_; \
+}
namespace v8 {
namespace internal {
@@ -68,6 +79,7 @@ class EvenMoreExperimentalScanner {
YYCTYPE* buffer_end_;
YYCTYPE* start_;
YYCTYPE* cursor_;
+ bool just_seen_line_terminator_;
YYCTYPE yych;
ExperimentalScanner* sink_;
« no previous file with comments | « no previous file | src/lexer/even-more-experimental-scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698