Draft
Conversation
This allows us to panic whenever the user passed an extension that is not defined for a given API, instead of silently continuing and leaving them wonder if/why any output is generated based on what they specified.
Some enums (currently only `GL_ACTIVE_PROGRAM_EXT`) have duplicate definitions with different values based on the selected API. Without this filter both will be emitted based on a simple regex filter by name only, thus make sure we only read the enums At the same time `api` filters apply to `<require>` blocks too: this allows certain extensions to pull in different names or bindings based on the API they're defined for, and we must make sure to only handle the block that matches `filter.api`.
By stripping and later appending a *possible* prefix for enum constants and command names we're not only spending a lot of CPU and human cycles (because this logic is impossible to understand), we're also loosing out on a few WGL commands that weren't prefixed with the `wgl` name. Conveniently these functions were referencing a typo'd `PIXELFORMATDESCRIPTOR` without leading `P`, which might otherwise not have been found. Do this by keeping all commands and enums keyed by their full name in `BTreeMap`s so that we can also track completely accurately when a `<delete>` or `<require>` would erroneously specify a name that doesn't exist.
…ms group="">` parsing Note that groups are currently entirely unused in the generator, but could become useful soon to emit typed APIs for existing `<param group="">` command arguments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Draft PR, currently containing the following improvements:
apifilters in<enum>and<require>boxas keyword, which is used in some parameters<groups>parsing with direct<enums group="">parsing