Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v1.0.1
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (28 sloc) 0.706 kb
//
// TDSequence.m
// TDParseKit
//
// Created by Todd Ditchendorf on 7/13/08.
// Copyright 2008 Todd Ditchendorf. All rights reserved.
//
#import "TDSequence.h"
#import "TDAssembly.h"
@interface TDParser ()
- (NSSet *)matchAndAssemble:(NSSet *)inAssemblies;
@end
@implementation TDSequence
+ (id)sequence {
return [[[self alloc] init] autorelease];
}
- (NSSet *)allMatchesFor:(NSSet *)inAssemblies {
NSParameterAssert(inAssemblies);
NSSet *outAssemblies = inAssemblies;
for (TDParser *p in subparsers) {
outAssemblies = [p matchAndAssemble:outAssemblies];
if (!outAssemblies.count) {
break;
}
}
return outAssemblies;
}
@end
Jump to Line
Something went wrong with that request. Please try again.