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

Side by Side Diff: src/char-predicates-inl.h

Issue 1774513002: [regexp] extend property classes by script category. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adapt expectations Created 4 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
« no previous file with comments | « src/char-predicates.h ('k') | src/regexp/regexp-parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_CHAR_PREDICATES_INL_H_ 5 #ifndef V8_CHAR_PREDICATES_INL_H_
6 #define V8_CHAR_PREDICATES_INL_H_ 6 #define V8_CHAR_PREDICATES_INL_H_
7 7
8 #include "src/char-predicates.h" 8 #include "src/char-predicates.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 inline bool IsAsciiIdentifier(uc32 c) { 38 inline bool IsAsciiIdentifier(uc32 c) {
39 return IsAlphaNumeric(c) || c == '$' || c == '_'; 39 return IsAlphaNumeric(c) || c == '$' || c == '_';
40 } 40 }
41 41
42 inline bool IsAlphaNumeric(uc32 c) { 42 inline bool IsAlphaNumeric(uc32 c) {
43 return IsInRange(AsciiAlphaToLower(c), 'a', 'z') || IsDecimalDigit(c); 43 return IsInRange(AsciiAlphaToLower(c), 'a', 'z') || IsDecimalDigit(c);
44 } 44 }
45 45
46 inline bool IsAlpha(uc32 c) {
47 return IsInRange(AsciiAlphaToLower(c), 'a', 'z');
48 }
49
46 inline bool IsDecimalDigit(uc32 c) { 50 inline bool IsDecimalDigit(uc32 c) {
47 // ECMA-262, 3rd, 7.8.3 (p 16) 51 // ECMA-262, 3rd, 7.8.3 (p 16)
48 return IsInRange(c, '0', '9'); 52 return IsInRange(c, '0', '9');
49 } 53 }
50 54
51 55
52 inline bool IsHexDigit(uc32 c) { 56 inline bool IsHexDigit(uc32 c) {
53 // ECMA-262, 3rd, 7.6 (p 15) 57 // ECMA-262, 3rd, 7.6 (p 15)
54 return IsDecimalDigit(c) || IsInRange(AsciiAlphaToLower(c), 'a', 'f'); 58 return IsDecimalDigit(c) || IsInRange(AsciiAlphaToLower(c), 'a', 'f');
55 } 59 }
(...skipping 26 matching lines...) Expand all
82 default: 86 default:
83 return true; 87 return true;
84 } 88 }
85 } 89 }
86 90
87 91
88 } // namespace internal 92 } // namespace internal
89 } // namespace v8 93 } // namespace v8
90 94
91 #endif // V8_CHAR_PREDICATES_INL_H_ 95 #endif // V8_CHAR_PREDICATES_INL_H_
OLDNEW
« no previous file with comments | « src/char-predicates.h ('k') | src/regexp/regexp-parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698