[TIMOB-24632] Hyperloop: iOS - Swift metabase parser using SourceKit
GitHub Issue | n/a |
---|---|
Type | Epic |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Hyperloop 2.1.0 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Eric Merriman |
Created | 2017-04-26T15:02:46.000+0000 |
Updated | 2017-04-26T15:04:01.000+0000 |
Description
*Current Swift metabase parser issues*
The current Swift metabase parser uses
swiftc -dump-ast
to parse Swift source code. This is very limited in functionality and complicated to parse. Also it currently lacks some important features like properly parsing collection types, using Swift only classes from system frameworks and parsing Swift code that references each other (across multiple files as well as forward declarations inside a single file)
*SourceKit*
Apple provides a much more flexible toolkit named [SourceKit](https://github.com/apple/swift/tree/master/tools/SourceKit) specially built for Swift IDE features which is also used internally by Xcode. SourceKit can be used to generate meta information about Swift Modules and single source files in a easy to parse JSON format.
*Useful Links*
https://github.com/apple/swift/tree/master/tools/SourceKit
https://github.com/jpsim/SourceKitten
https://news.realm.io/news/appbuilders-jp-simard-sourcekit/
No comments