Skip to content
Newer
Older
100644 17 lines (16 sloc) 1.09 KB
d0034af @itod Merge from SVN. All new Static features included
authored
1 {%for 1 to depth %} {%/for%}static NSRegularExpression *regex = nil;
2 {%for 1 to depth %} {%/for%}if (!regex) {
3 {%for 1 to depth %} {%/for%} NSError *err = nil;
4 {%for 1 to depth %} {%/for%} regex = [[NSRegularExpression regularExpressionWithPattern:@"{{pattern}}" options:NSRegularExpressionCaseInsensitive error:&err] retain];
5 {%for 1 to depth %} {%/for%} if (!regex) {
6 {%for 1 to depth %} {%/for%} if (err) NSLog(@"%@", err);
7 {%for 1 to depth %} {%/for%} }
8 {%for 1 to depth %} {%/for%}}
9 {%for 1 to depth %} {%/for%}
10 {%for 1 to depth %} {%/for%}NSString *str = LS(1);
11 {%for 1 to depth %} {%/for%}
12 {%for 1 to depth %} {%/for%}if ({%if predicate %}{{predicate}} && ({%/if%}[regex numberOfMatchesInString:str options:0 range:NSMakeRange(0, [str length])]{%if predicate %}){%/if%}) {
af33a8b @itod remove expected: arg. move back to _tokenKindNameTab
authored
13 {%for 1 to depth %} {%/for%} [self match:TOKEN_KIND_BUILTIN_ANY discard:{%if discard %}YES{%else%}NO{%/if%}];
d0034af @itod Merge from SVN. All new Static features included
authored
14 {%for 1 to depth %} {%/for%}} else {
15 {%for 1 to depth %} {%/for%} [self raise:@"pattern test failed in {{methodName}}"];
16 {%for 1 to depth %} {%/for%}}
Something went wrong with that request. Please try again.