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

Unified Diff: src/ast.h

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
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 8972f2566734b062c25f31869a754018502069d0..00004791153fd48ed84085d2514dd620f3295dac 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1193,6 +1193,7 @@ class ThisFunction: public Expression {
VISIT(Quantifier) \
VISIT(Capture) \
VISIT(Lookahead) \
+ VISIT(Backreference) \
VISIT(Empty)
@@ -1357,6 +1358,16 @@ class RegExpLookahead: public RegExpTree {
};
+class RegExpBackreference: public RegExpTree {
+ public:
+ explicit RegExpBackreference(int index) : index_(index) { }
+ virtual void* Accept(RegExpVisitor* visitor, void* data);
+ int index() { return index_; }
+ private:
+ int index_;
+};
+
+
class RegExpEmpty: public RegExpTree {
public:
RegExpEmpty() { }
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698