Closed JaapWijnen closed 1 year ago
Hey @JaapWijnen! We have intended to make the parser builder generic over its input, but haven't carved out the time to do so yet, especially since it'll likely require many more changes in the library to work, as you seem to be confirming. Let's keep this issue open as an action item, and we'll make sure we return to it before these changes make it into an official version of Swift.
Upgrading to 0.12 and following this guidance solved issues for me with Swift 5.8. Can this issue be closed now?
@dmzza Yup, thanks for the nudge!
This describes and discusses the issue: https://github.com/apple/swift/issues/62978
It seems a design choice was made to make resultBuilders stricter in how they compile causing some of the behaviour swift-parsing was relying on to no longer be valid. I've made the example provided in the discussion work for the new toolchain (2023-01-09) by making the
ParserBuilder
generic over the acceptedInput
, see solution below.I've tried but haven't succeeded in creating a fix for the library as a whole however. Would love to hear your thoughts on this cause I'm a little stuck at the moment unfortunately.