Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (17 sloc) 425 Bytes
@import "TDCollectionParser.j"
@import "TDAssembly.j"
@implementation TDAlternation : TDCollectionParser
{
}
+ (id)alternation
{
return [[self alloc] init];
}
- (CPSet)allMatchesFor:(CPSet)inAssemblies
{
var outAssemblies = [CPSet set];
for (var i=0, count=[subparsers count]; i<count; i++)
[outAssemblies unionSet:[subparsers[i] matchAndAssemble:inAssemblies]];
return outAssemblies;
}
@end