mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
To ensure SwiftSyntax calls a compatible parser library, this patch sets up a C API that returns a constant string calculated during compilation time to indicate the version of syntax node declarations. The same hash will be calculated in the SwiftSyntax (client) side as well by using the same algorithm. During runtime, SwiftSyntax will verify its hash value is identical to the result of calling swiftparse_node_declaration_hash before actual parsing happens. This patch only sets the API up. The actual implementation of the hashing algorithm will come later.
7.9 KiB
7.9 KiB