Created
November 1, 2011 14:18
-
-
Save beelsebob/1330600 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
| - (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:[MapCSSUURL class]]) | |
| { | |
| return [[MapCSSURLSpecifier alloc] initWithSyntaxTree:syntaxTree]; | |
| } | |
| else | |
| { | |
| return [[MapCSSEvalSpecifier alloc] initWithSyntaxTree:syntaxTree]; | |
| } | |
| } | |
| return self; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment