Changeset 100167 in webkit for trunk/Source/JavaScriptCore/yarr/YarrParser.h
- Timestamp:
- Nov 14, 2011, 11:25:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrParser.h
r98624 r100167 44 44 45 45 // The Parser class should not be used directly - only via the Yarr::parse() method. 46 template<class Delegate >46 template<class Delegate, typename CharType> 47 47 class Parser { 48 48 private: … … 232 232 , m_backReferenceLimit(backReferenceLimit) 233 233 , m_err(NoError) 234 , m_data(pattern. characters16())234 , m_data(pattern.getCharacters<CharType>()) 235 235 , m_size(pattern.length()) 236 236 , m_index(0) … … 238 238 { 239 239 } 240 240 241 241 /* 242 242 * parseEscape(): … … 794 794 unsigned m_backReferenceLimit; 795 795 ErrorCode m_err; 796 const UChar* m_data;796 const CharType* m_data; 797 797 unsigned m_size; 798 798 unsigned m_index; … … 865 865 const char* parse(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit = quantifyInfinite) 866 866 { 867 return Parser<Delegate>(delegate, pattern, backReferenceLimit).parse(); 867 if (pattern.is8Bit()) 868 return Parser<Delegate, LChar>(delegate, pattern, backReferenceLimit).parse(); 869 return Parser<Delegate, UChar>(delegate, pattern, backReferenceLimit).parse(); 868 870 } 869 871
Note:
See TracChangeset
for help on using the changeset viewer.