OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 const uint32_t unicodeDigit = Number_DecimalDigit; | 95 const uint32_t unicodeDigit = Number_DecimalDigit; |
96 const uint32_t unicodeConnectorPunctuation = Punctuation_Connector; | 96 const uint32_t unicodeConnectorPunctuation = Punctuation_Connector; |
97 | 97 |
98 static inline bool isIdentifierStartCharacter(UChar c) | 98 static inline bool isIdentifierStartCharacter(UChar c) |
99 { | 99 { |
100 return (category(c) & unicodeLetter) || (c == '$') || (c == '_'); | 100 return (category(c) & unicodeLetter) || (c == '$') || (c == '_'); |
101 } | 101 } |
102 | 102 |
103 static inline bool isIdentifierCharacter(UChar c) | 103 static inline bool isIdentifierCharacter(UChar c) |
104 { | 104 { |
105 return (category(c) & (unicodeLetter | unicodeCombiningMark | unicodeDigit |
unicodeConnectorPunctuation)) || (c == '$') || (c == '_') || (c == zeroWidthNon
Joiner) || (c == zeroWidthJoiner); | 105 return (category(c) & (unicodeLetter | unicodeCombiningMark | unicodeDigit |
unicodeConnectorPunctuation)) || (c == '$') || (c == '_') || (c == zeroWidthNon
JoinerCharacter) || (c == zeroWidthJoinerCharacter); |
106 } | 106 } |
107 | 107 |
108 } // namespace | 108 } // namespace |
109 | 109 |
110 IDBKeyPathLexer::TokenType IDBKeyPathLexer::lexIdentifier(String& element) | 110 IDBKeyPathLexer::TokenType IDBKeyPathLexer::lexIdentifier(String& element) |
111 { | 111 { |
112 unsigned start = m_index; | 112 unsigned start = m_index; |
113 if (m_index < m_length && isIdentifierStartCharacter(m_string[m_index])) | 113 if (m_index < m_length && isIdentifierStartCharacter(m_string[m_index])) |
114 ++m_index; | 114 ++m_index; |
115 else | 115 else |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 case StringType: | 297 case StringType: |
298 return m_string == other.m_string; | 298 return m_string == other.m_string; |
299 case ArrayType: | 299 case ArrayType: |
300 return m_array == other.m_array; | 300 return m_array == other.m_array; |
301 } | 301 } |
302 ASSERT_NOT_REACHED(); | 302 ASSERT_NOT_REACHED(); |
303 return false; | 303 return false; |
304 } | 304 } |
305 | 305 |
306 } // namespace blink | 306 } // namespace blink |
OLD | NEW |