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

Parse properties, superclass and conforming protocols #393

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Eskils
Copy link

@Eskils Eskils commented Aug 1, 2024

This PR aims to implement support for parsing @\property declarations, an interface’s superclass and conforming protocols.

The following header-file:

@interface BasicName : NSObject <Ponies, Foo>

// Another comment
@property(nonatomic, readonly) NSArray<NSString *> titles;


// This is the comment of basic method one
- (NSInteger)basicMethodOne;

@end

…will be parsed into:

{
    "name": "BasicName",
    "superclass": "NSObject",
    "protocols": ["Ponies", "Foo"],
    "properties": [
        {
	    "attributes": ["nonatomic", "readonly"],
	    "name": "titles",
	    "type": "NSArray<NSString *>"
        }
    ],
    "methods": [
        {
	    "args": [],
	    "comment": "This is the comment of basic method one",
	    "name": "basicMethodOne",
	    "returnType": "NSInteger"
        }
    ]
}

Please let me know if there is anything you would like to change or supplement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant