Open tjprescott opened 3 years ago
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment.
This has not been addressed. I have a private fork where I made this work for my use case,
🚨New Issue Checklist🚨
swift-ast -github-issue /path/to/file.swift
might help me generate this fileIssue Summary
I am using
swift-ast
to parse Swift source code, and for that, it works great. However, I also need to be able to parse*.swiftinterface
files, as that is what I can generate from Objective-C headers. Since I only care about the public interface, this is ideal. However, I can't parse these files withswift-ast
because it exits with aDiagnosticStopper
error.I've had to try modifying the swiftinterface files to make them "look" like compilable Swift, for example, by adding empty brackets {} after function declarations. In this way I've been able to hackily use
swift-ast
for my purposes, but it's much too brittle to be effective.I tried using SourceKitten directly to examine the structure, which was very promising as it works the same for swift and swiftinterface, but unfortunately it seems to be missing a bunch of stuff that I am currently able to get from swift-ast.
Reproduction Steps
Run
swift-ast
on any*.swiftinterface
fileExpected Result
Code is parsed and I can navigate the tree, albeit with less detail.
Actual Behavior
DiagnosticStopped exit.