Chromium Code Reviews| OLD | NEW | 
|---|---|
| 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 Loading... | |
| 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_ | 
| OLD | NEW |