Changeset 75595 in webkit for trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp
- Timestamp:
- Jan 12, 2011, 2:32:29 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp
r75421 r75595 28 28 #include "YarrPattern.h" 29 29 30 #include "YarrInterpreter.h" 30 #include "Yarr.h" 31 #include "YarrParser.h" 31 32 #include <wtf/Vector.h> 32 33 … … 930 931 }; 931 932 932 933 static const char* compile(const UString& patternString, YarrPattern& pattern) 933 const char* YarrPattern::compile(const UString& patternString) 934 934 { 935 YarrPatternConstructor constructor( pattern);935 YarrPatternConstructor constructor(*this); 936 936 937 937 if (const char* error = parse(constructor, patternString)) … … 942 942 // "Note: if the number of left parentheses is less than the number specified 943 943 // in \#, the \# is taken as an octal escape as described in the next row." 944 if (pattern.containsIllegalBackReference()) { 945 unsigned numSubpatterns = pattern.m_numSubpatterns; 946 944 if (containsIllegalBackReference()) { 947 945 constructor.reset(); 948 946 #if !ASSERT_DISABLED 949 947 const char* error = 950 948 #endif 951 parse(constructor, patternString, numSubpatterns);949 parse(constructor, patternString, m_numSubpatterns); 952 950 953 951 ASSERT(!error); 954 ASSERT(numSubpatterns == pattern.m_numSubpatterns);955 952 } 956 953 … … 962 959 963 960 return 0; 964 } ;961 } 965 962 966 963 YarrPattern::YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error) … … 980 977 , nonwordcharCached(0) 981 978 { 982 *error = compile(pattern , *this);979 *error = compile(pattern); 983 980 } 984 981
Note:
See TracChangeset
for help on using the changeset viewer.