Skip to content
This repository was archived by the owner on Jun 19, 2019. It is now read-only.
This repository was archived by the owner on Jun 19, 2019. It is now read-only.

.cas contain not exist cocoa class #107

@minerany

Description

@minerany

if the .cas file contain the not exist class (not css dot class) , the all .cas sheet will not apply, so i think if this is the right thing.maybe we should log a warning ,not return a error and nil?

        if ([tokenValue hasPrefix:@"."]) {
            styleSelector.styleClass = [tokenValue substringFromIndex:1];
        } else {
            styleSelector.objectClass = NSClassFromString(tokenValue);
        }

        if (!styleSelector.objectClass && !shouldConcatToParent) {
            self.error = [self.lexer errorWithDescription:[NSString stringWithFormat:@"Invalid class name `%@`", tokenValue]
                                                   reason:@"Every selector must have a objectClass"
                                                     code:CASParseErrorFileContents];
            return nil;
        }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions