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

add support for Objective-C ivars #105

Merged
merged 1 commit into from
Nov 24, 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ None.

##### Bug Fixes

* Add support for C/C++ struct & field types.
* Add support for C/C++ struct, field & ivar types.
[JP Simard](https://github.com/jpsim)
[jazzy#374](https://github.com/realm/jazzy/issues/374)
[jazzy#387](https://github.com/realm/jazzy/issues/387)

* Fix issue where Swift extensions would pick up documentation from previous
tokens.
Expand Down
3 changes: 3 additions & 0 deletions Source/SourceKittenFramework/ObjCDeclarationKind.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public enum ObjCDeclarationKind: String {
case Struct = "sourcekitten.source.lang.objc.decl.struct"
/// `field`
case Field = "sourcekitten.source.lang.objc.decl.field"
/// `ivar`
case Ivar = "sourcekitten.source.lang.objc.decl.ivar"

public static func fromClang(kind: CXCursorKind) -> ObjCDeclarationKind {
switch kind.rawValue {
Expand All @@ -58,6 +60,7 @@ public enum ObjCDeclarationKind: String {
case CXCursor_FunctionDecl.rawValue: return .Function
case CXCursor_StructDecl.rawValue: return .Struct
case CXCursor_FieldDecl.rawValue: return .Field
case CXCursor_ObjCIvarDecl.rawValue: return .Ivar
default: fatalError("Unsupported CXCursorKind: \(clang_getCursorKindSpelling(kind))")
}
}
Expand Down