Created
October 31, 2011 20:39
-
-
Save beelsebob/1328840 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @implementation MapCSSSpecifier | |
| - (id)initWithSyntaxTree:(CPSyntaxTree *)syntaxTree | |
| { | |
| self = [super init]; | |
| if ([self class] == [MapCSSSpecifier class]) | |
| { | |
| id item = [[syntaxTree children] objectAtIndex:0]; | |
| if ([item isKindOfClass:[MapCSSNamed class]]) | |
| { | |
| return [[MapCSSNamedSpecifier alloc] initWithSyntaxTree:syntaxTree]; | |
| } | |
| else if ([item isKindOfClass:[MapCSSSize class]]) | |
| { | |
| return [[MapCSSSizeListSpecifier alloc] initWithSyntaxTree:syntaxTree]; | |
| } | |
| else if ([item isKindOfClass:[UIColor class]]) | |
| { | |
| return [[MapCSSColourSpecifier alloc] initWithSyntaxTree:syntaxTree]; | |
| } | |
| else if ([item isKindOfClass:[MapCSSURL class]]) | |
| { | |
| return [[MapCSSURLSpecifier alloc] initWithSyntaxTree:syntaxTree]; | |
| } | |
| else | |
| { | |
| return [[MapCSSEvalSpecifier alloc] initWithSyntaxTree:syntaxTree]; | |
| } | |
| } | |
| return self; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment