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); |