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

Side by Side Diff: src/regexp/regexp-ast.h

Issue 2725583002: [regexp] fix /\W/ui wrt \u017f and \u212a. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_REGEXP_REGEXP_AST_H_ 5 #ifndef V8_REGEXP_REGEXP_AST_H_
6 #define V8_REGEXP_REGEXP_AST_H_ 6 #define V8_REGEXP_REGEXP_AST_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 #include "src/utils.h" 9 #include "src/utils.h"
10 #include "src/zone/zone-containers.h" 10 #include "src/zone/zone-containers.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 74
75 // Represents code units in the range from from_ to to_, both ends are 75 // Represents code units in the range from from_ to to_, both ends are
76 // inclusive. 76 // inclusive.
77 class CharacterRange { 77 class CharacterRange {
78 public: 78 public:
79 CharacterRange() : from_(0), to_(0) {} 79 CharacterRange() : from_(0), to_(0) {}
80 // For compatibility with the CHECK_OK macro 80 // For compatibility with the CHECK_OK macro
81 CharacterRange(void* null) { DCHECK_NULL(null); } // NOLINT 81 CharacterRange(void* null) { DCHECK_NULL(null); } // NOLINT
82 static void AddClassEscape(uc16 type, ZoneList<CharacterRange>* ranges, 82 static void AddClassEscape(uc16 type, ZoneList<CharacterRange>* ranges,
83 Zone* zone); 83 bool add_unicode_case_equivalents, Zone* zone);
jgruber 2017/02/28 13:44:56 What if we add an AddClassEscape overload that imp
Yang 2017/02/28 14:26:11 Done.
84 static Vector<const int> GetWordBounds(); 84 static Vector<const int> GetWordBounds();
85 static inline CharacterRange Singleton(uc32 value) { 85 static inline CharacterRange Singleton(uc32 value) {
86 return CharacterRange(value, value); 86 return CharacterRange(value, value);
87 } 87 }
88 static inline CharacterRange Range(uc32 from, uc32 to) { 88 static inline CharacterRange Range(uc32 from, uc32 to) {
89 DCHECK(0 <= from && to <= String::kMaxCodePoint); 89 DCHECK(0 <= from && to <= String::kMaxCodePoint);
90 DCHECK(static_cast<uint32_t>(from) <= static_cast<uint32_t>(to)); 90 DCHECK(static_cast<uint32_t>(from) <= static_cast<uint32_t>(to));
91 return CharacterRange(from, to); 91 return CharacterRange(from, to);
92 } 92 }
93 static inline CharacterRange Everything() { 93 static inline CharacterRange Everything() {
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 RegExpEmpty* AsEmpty() override; 545 RegExpEmpty* AsEmpty() override;
546 bool IsEmpty() override; 546 bool IsEmpty() override;
547 int min_match() override { return 0; } 547 int min_match() override { return 0; }
548 int max_match() override { return 0; } 548 int max_match() override { return 0; }
549 }; 549 };
550 550
551 } // namespace internal 551 } // namespace internal
552 } // namespace v8 552 } // namespace v8
553 553
554 #endif // V8_REGEXP_REGEXP_AST_H_ 554 #endif // V8_REGEXP_REGEXP_AST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698