Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator: Handle <command> via vk-parse types and nom #719

Merged
merged 1 commit into from Mar 21, 2023

Conversation

MarijnS95
Copy link
Collaborator

For the upcoming api attribute in vk.xml commands also need to be processed through vk-parse which has support for all the new attributes, while vkxml is deprecated and completely untouched for years. This conversion unfortunately requires whipping up yet another quick-and-dirty nom parser of a specific subset of C used in vk.xml to describe parameter signatures. This PR shows that conversion is complete and provides no accidental semantic differences.

Also update vk-parse to 0.9 which contains a new code field on CommandParam (<param> element) to be able to inspect the code signature of individual parameters rather than parsing them out of (and matching them back to vk-parse's params array!) the <command> / CommandDefinition as a whole:
krolli/vk-parse#25 (comment)
krolli/vk-parse@615ffb6

For the upcoming `api` attribute in `vk.xml` commands also need to be
processed through `vk-parse` which has support for all the new
attributes, while `vkxml` is deprecated and completely untouched for
years.  This conversion unfortunately requires whipping up yet another
quick-and-dirty `nom` parser of a specific subset of C used in `vk.xml`
to describe parameter signatures.  This PR shows that conversion is
complete and provides no accidental semantic differences.

Also update `vk-parse` to `0.9` which contains a new `code` field on
`CommandParam` (`<param>` element) to be able to inspect the code
signature of individual parameters rather than parsing them out of (and
matching them back to `vk-parse`'s `params` array!) the `<command>`
/ `CommandDefinition` as a whole:
krolli/vk-parse#25 (comment)
krolli/vk-parse@615ffb6
@MarijnS95 MarijnS95 merged commit 61b7415 into master Mar 21, 2023
16 checks passed
@MarijnS95 MarijnS95 deleted the vk-parse-commands branch March 21, 2023 05:30
MarijnS95 added a commit that referenced this pull request Apr 2, 2023
For the upcoming `api` attribute in `vk.xml` commands also need to be
processed through `vk-parse` which has support for all the new
attributes, while `vkxml` is deprecated and completely untouched for
years.  This conversion unfortunately requires whipping up yet another
quick-and-dirty `nom` parser of a specific subset of C used in `vk.xml`
to describe parameter signatures.  This PR shows that conversion is
complete and provides no accidental semantic differences.

Also update `vk-parse` to `0.9` which contains a new `code` field on
`CommandParam` (`<param>` element) to be able to inspect the code
signature of individual parameters rather than parsing them out of (and
matching them back to `vk-parse`'s `params` array!) the `<command>`
/ `CommandDefinition` as a whole:
krolli/vk-parse#25 (comment)
krolli/vk-parse@615ffb6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants