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

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

Issue 2044803003: [regexp] disallow regexp property class shorthand syntax for single char. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix tests Created 4 years, 6 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 | test/mjsunit/harmony/regexp-property-exact-match.js » ('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 abb644ac3f8057c91c5648177b6b8bdc4d4e3f14..bdfa13f719e09416f4af414d696100d2e6101690 100644
--- a/src/regexp/regexp-parser.cc
+++ b/src/regexp/regexp-parser.cc
@@ -912,7 +912,6 @@ bool LookupPropertyValueName(UProperty property,
bool RegExpParser::ParsePropertyClass(ZoneList<CharacterRange>* result) {
// Parse the property class as follows:
- // - \pN with a single-character N is equivalent to \p{N}
// - In \p{name}, 'name' is interpreted
// - either as a general category property value name.
// - or as a binary property name.
@@ -935,9 +934,6 @@ bool RegExpParser::ParsePropertyClass(ZoneList<CharacterRange>* result) {
}
second_part.Add(0); // null-terminate string.
}
- } else if (current() != kEndMarker) {
- // Parse \pN, where N is a single-character property name value.
- first_part.Add(static_cast<char>(current()));
} else {
return false;
}
« no previous file with comments | « no previous file | test/mjsunit/harmony/regexp-property-exact-match.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698