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

Unified Diff: src/regexp/regexp-parser.cc

Issue 2636883002: [regexp] Implement regexp groups as wrapper. (Closed)
Patch Set: fix Created 3 years, 11 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 | « src/regexp/regexp-ast.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp/regexp-parser.cc
diff --git a/src/regexp/regexp-parser.cc b/src/regexp/regexp-parser.cc
index 3035f6a9a953e6eb5ffe4466e07612f27b6c9996..3621f7d96e4fbf4634b7a214d7beb5defa019eae 100644
--- a/src/regexp/regexp-parser.cc
+++ b/src/regexp/regexp-parser.cc
@@ -216,7 +216,9 @@ RegExpTree* RegExpParser::ParseDisjunction() {
RegExpCapture* capture = GetCapture(capture_index);
capture->set_body(body);
body = capture;
- } else if (group_type != GROUPING) {
+ } else if (group_type == GROUPING) {
+ body = new (zone()) RegExpGroup(body);
+ } else {
DCHECK(group_type == POSITIVE_LOOKAROUND ||
group_type == NEGATIVE_LOOKAROUND);
bool is_positive = (group_type == POSITIVE_LOOKAROUND);
« no previous file with comments | « src/regexp/regexp-ast.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698