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

Unified Diff: src/ast.cc

Issue 8635: Backreferences (Closed)
Patch Set: Added test case Created 12 years, 2 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
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 9b0965da03006bb7e1fae05c4877e192f87cdc39..c0c16dedee5df73af3c19691b456c73642dd40a6 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -328,6 +328,13 @@ void* RegExpUnparser::VisitLookahead(RegExpLookahead* that, void* data) {
}
+void* RegExpUnparser::VisitBackreference(RegExpBackreference* that,
+ void* data) {
+ stream()->Add("(<- %i)", that->index());
+ return NULL;
+}
+
+
void* RegExpUnparser::VisitEmpty(RegExpEmpty* that, void* data) {
stream()->Put('%');
return NULL;

Powered by Google App Engine
This is Rietveld 408576698