You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am aware that the swift-ast -github-issue /path/to/file.swift might help me generate this file
Issue 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 with swift-ast because it exits with a DiagnosticStopper 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 file
Expected Result
Code is parsed and I can navigate the tree, albeit with less detail.
Actual Behavior
DiagnosticStopped exit.
The text was updated successfully, but these errors were encountered:
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.
🚨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.
The text was updated successfully, but these errors were encountered: