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

Side by Side Diff: src/char-predicates.cc

Issue 640193002: Allow identifier code points from supplementary multilingual planes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add missing file Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/char-predicates.h ('k') | test/unittests/unicode/unicode-predicates-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2011 the V8 project authors. All rights reserved.
mathias 2014/10/09 10:40:15 2014, no?
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/char-predicates.h"
6
7 #ifdef V8_I18N_SUPPORT
8 #include "unicode/uchar.h"
9 #include "unicode/urename.h"
10 #endif // V8_I18N_SUPPORT
11
12 namespace v8 {
13 namespace internal {
14
15 bool SupplementaryPlanes::IsIDStart(uc32 c) {
16 DCHECK(c > 0xFFFF);
17 #ifdef V8_I18N_SUPPORT
18 // This only works for code points in the SMPs, since ICU does not exclude
19 // code points with properties 'Pattern_Syntax' or 'Pattern_White_Space'.
20 // Code points in the SMP do not have those properties.
21 return u_isIDStart(c);
22 #else
23 // This is incorrect, but if we don't have ICU, use this as fallback.
24 return false;
25 #endif // V8_I18N_SUPPORT
26 }
27
28
29 bool SupplementaryPlanes::IsIDPart(uc32 c) {
30 DCHECK(c > 0xFFFF);
31 #ifdef V8_I18N_SUPPORT
32 // This only works for code points in the SMPs, since ICU does not exclude
33 // code points with properties 'Pattern_Syntax' or 'Pattern_White_Space'.
34 // Code points in the SMP do not have those properties.
35 return u_isIDPart(c);
36 #else
37 // This is incorrect, but if we don't have ICU, use this as fallback.
38 return false;
39 #endif // V8_I18N_SUPPORT
40 }
41 }
42 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/char-predicates.h ('k') | test/unittests/unicode/unicode-predicates-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698