Can ast be converted to Swift?
Closed this issue · 3 comments
LuckyRoc commented
Can ast be converted to Swift?
kishikawakatsumi commented
@ChengRuipeng Not sure what you mean by "converted to Swift," can you elaborate?
LuckyRoc commented
@ChengRuipeng Not sure what you mean by "converted to Swift," can you elaborate?
I can convert Swift to AST by 'swift-ast-explorer', can I convert AST back to Swift?
kishikawakatsumi commented
@ChengRuipeng No you can't. 'swift-ast-explorer'
converts AST to HTML for visualization. It is not reversible.
I recommend to use SwiftSyntax directly. SwiftSyntax is created for making it easier to rewrite Swift AST.