The cleansec.xcodeproj contents will hold all the targets and code associated with cleansec's implementation. This commit adds two new targets, the cleansec binary, and SwiftAstParser framework. The binary is currently just a skeleton and emits "Hello World" when run.
SwiftAstParser is the associated parsing library that takes the -dump-ast format as input. Influenced heavily by Apple's swift-syntax library, this framework offers a public SyntaxVisitor protocol that implementations can use to traverse the AST tree. The syntax nodes are code generated from known typed AST nodes inside Apple's swift library. If any node is non-parseable, it will fall into the UnknownSyntax path. These are still traversable and provide the raw contents. Currently the nodes are associated with Swift 5.2. Each version of SwiftAstParser will be mapped to a specific swift version.
The
cleansec.xcodeproj
contents will hold all the targets and code associated withcleansec
's implementation. This commit adds two new targets, thecleansec
binary, andSwiftAstParser
framework. The binary is currently just a skeleton and emits "Hello World" when run.SwiftAstParser
is the associated parsing library that takes the-dump-ast
format as input. Influenced heavily by Apple'sswift-syntax
library, this framework offers a publicSyntaxVisitor
protocol that implementations can use to traverse the AST tree. The syntax nodes are code generated from known typed AST nodes inside Apple's swift library. If any node is non-parseable, it will fall into theUnknownSyntax
path. These are still traversable and provide the raw contents. Currently the nodes are associated with Swift 5.2. Each version ofSwiftAstParser
will be mapped to a specific swift version.