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

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

Issue 9433031: Allow the ZWJ and ZWNJ characters in IdentifierPart as per ES5. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 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 | « AUTHORS ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 case '$': case '_': case '\\': return true; 49 case '$': case '_': case '\\': return true;
50 default: return unibrow::Letter::Is(c); 50 default: return unibrow::Letter::Is(c);
51 } 51 }
52 } 52 }
53 }; 53 };
54 54
55 55
56 struct IdentifierPart { 56 struct IdentifierPart {
57 static inline bool Is(uc32 c) { 57 static inline bool Is(uc32 c) {
58 return IdentifierStart::Is(c) 58 return IdentifierStart::Is(c)
59 || c == 0x200C
60 || c == 0x200D
mathias 2012/02/22 09:49:37 As an `IdentifierStart` character is the most comm
Lasse Reichstein Nielsen 2012/02/22 14:03:28 Good thought. I'd prefer moving the number (digit,
59 || unibrow::Number::Is(c) 61 || unibrow::Number::Is(c)
60 || unibrow::CombiningMark::Is(c) 62 || unibrow::CombiningMark::Is(c)
61 || unibrow::ConnectorPunctuation::Is(c); 63 || unibrow::ConnectorPunctuation::Is(c);
62 } 64 }
63 }; 65 };
64 66
65 } } // namespace v8::internal 67 } } // namespace v8::internal
66 68
67 #endif // V8_CHAR_PREDICATES_H_ 69 #endif // V8_CHAR_PREDICATES_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698