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

Issue 9718015: Make failed capturing parenthesis produce null instead of "". (Closed)

Created:
8 years, 9 months ago by cshapiro
Modified:
8 years, 9 months ago
Reviewers:
ahe, siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Make failed capturing parenthesis produce null instead of "". BUG=2068 Committed: https://code.google.com/p/dart/source/detail?r=5670

Patch Set 1 #

Patch Set 2 : eliminate merge residue #

Total comments: 2

Patch Set 3 : return null for inner uncaptured groups #

Patch Set 4 : remove unneeded diffs in regexp_jsc.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -7 lines) Patch
M runtime/lib/regexp.dart View 1 2 2 chunks +15 lines, -7 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 2 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
cshapiro
8 years, 9 months ago (2012-03-17 03:05:43 UTC) #1
cshapiro
8 years, 9 months ago (2012-03-19 16:42:02 UTC) #2
siva
lgtm http://codereview.chromium.org/9718015/diff/3001/runtime/lib/regexp_jsc.cc File runtime/lib/regexp_jsc.cc (right): http://codereview.chromium.org/9718015/diff/3001/runtime/lib/regexp_jsc.cc#newcode157 runtime/lib/regexp_jsc.cc:157: const int kMatchPair = 2; ASSERT(retval <= (num_bracket_expressions ...
8 years, 9 months ago (2012-03-19 18:29:14 UTC) #3
ahe
As best as I can tell, this still returns an empty string for unmatched groups ...
8 years, 9 months ago (2012-03-19 20:59:55 UTC) #4
cshapiro
8 years, 9 months ago (2012-03-19 21:07:55 UTC) #5
Thanks for looking.  I had not considered the case of unmatched groups
intermixed with matched groups.  I will add code to correctly handle this.

Powered by Google App Engine
This is Rietveld 408576698