Skip to content

Conversation

@redsun82
Copy link
Contributor

@redsun82 redsun82 commented May 4, 2022

This adds cppgen, creating structured C++ classes mirroring QL classes
out of schema.yml.

An example of generated code at the time of this commit can be found
in this gist.

This also introduces the ?* (repeated optional) type modifier in the schema
specification. On the dbscheme and QL side, this behaves just like *, save
for the fact that getNumberOfX is not generated. On the C++ side, this
translates to a vector<optional<X>> type.

Closes https://github.com/github/codeql-c-team/issues/863

This adds `cppgen`, creating structured C++ classes mirroring QL classes
out of `schema.yml`.

An example of generated code at the time of this commit can be found
[in this gist][1].

[1]: https://gist.github.com/redsun82/57304ddb487a8aa40eaa0caa695048fa

Closes github/codeql-c-team#863
@redsun82 redsun82 requested a review from AlexDenisov May 4, 2022 16:23
@redsun82 redsun82 requested review from a team as code owners May 4, 2022 16:23
@github-actions github-actions bot added the Swift label May 4, 2022
@redsun82
Copy link
Contributor Author

redsun82 commented May 4, 2022

this is on top of #9028, so you should ignore the first commit for now (the trapgen unit tests)

redsun82 added 2 commits May 5, 2022 09:48
This indicates a list of optional entries. This is different than
simply repeatind entries because of the indexing.
@redsun82 redsun82 added the no-change-note-required This PR does not need a change note label May 5, 2022
AlexDenisov
AlexDenisov previously approved these changes May 9, 2022
@redsun82 redsun82 requested a review from AlexDenisov May 9, 2022 14:35
@redsun82 redsun82 merged commit effa9ee into github:main May 9, 2022
@redsun82 redsun82 deleted the swift-cpp-gen branch August 16, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Swift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants