Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove too generic and unnecessary isItem definition in NSObject cate… #3

Merged
merged 1 commit into from
Nov 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,3 @@
- (BOOL)isEqualToItem:(NUIPItem *)item;

@end

@interface NSObject (NUIPIsItem)

- (BOOL)isItem;

@end
16 changes: 1 addition & 15 deletions NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,9 @@ - (id)itemByMovingDotRight
return [c autorelease];
}

- (BOOL)isItem
{
return YES;
}

- (BOOL)isEqual:(id)object
{
return [object isItem] && ((NUIPItem *)object)->position == position && ((NUIPItem *)object)->rule == rule;
return [object isKindOfClass:[NUIPItem class]] && [self isEqualToItem:object];
}

- (BOOL)isEqualToItem:(NUIPItem *)item
Expand Down Expand Up @@ -118,12 +113,3 @@ - (NSString *)description
}

@end

@implementation NSObject (NUIPIsItem)

- (BOOL)isItem
{
return NO;
}

@end