Changeset 75602 in webkit for trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp
- Timestamp:
- Jan 12, 2011, 4:57:06 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp
r75597 r75602 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;944 if (containsIllegalBackReference()) { 945 unsigned numSubpatterns = m_numSubpatterns; 946 946 947 947 constructor.reset(); … … 952 952 953 953 ASSERT(!error); 954 ASSERT(numSubpatterns == pattern.m_numSubpatterns);954 ASSERT(numSubpatterns == m_numSubpatterns); 955 955 } 956 956 … … 962 962 963 963 return 0; 964 } ;964 } 965 965 966 966 YarrPattern::YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error) … … 980 980 , nonwordcharCached(0) 981 981 { 982 *error = compile(pattern , *this);982 *error = compile(pattern); 983 983 } 984 984
Note:
See TracChangeset
for help on using the changeset viewer.