Parse slang.h for future language binding generation #5804
+302
−95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements parsing of slang.h as part of #5565. It adds the specific requirements to parse that file to slang-cpp-parser which was introduced in #5675. Additionally this adds a new target slang-binding-generator that can be used in the future to implement the language bindings in. For now it just provides a testing environment. Even though this doesn't generate output yet, it already parses slang.h during the build process to ensure the work from this PR doesn't break once merged.
Currently a draft PR so people know this is being worked on and to collect feedback on how the lack of a preprocessor in the parser should be handled, see
TODO:
comments in the code.Before this gets merged I'd still like to do some refactoring to reduce code duplication between the newly created slang-binding-generator and slang-cpp-extractor which it was derived from.
To test the parser, you may run a command similar to this:
slang-binding-generator -d C:\dev\slang\include slang.h -dump
.