Skip to content

Commit

Permalink
Merge pull request #105 from jpsim/jp-objc-ivar
Browse files Browse the repository at this point in the history
add support for Objective-C ivars
  • Loading branch information
jpsim committed Nov 24, 2015
2 parents 2d161d8 + 042d630 commit af07f65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit af07f65

Please sign in to comment.