-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_protobuf: Generate kValue-style aliases for enum cases
To make pw_protobuf code more beautiful at the point of use, generate aliases for enum cases that match the kValue style, with common prefixes removed. e.g. given enum State { STATE_UNKNOWN = 0; STATE_OFF = 1; STATE_ON = 2; }; in addition to the basic enum class generated: enum class State { STATE_UNKNOWN = 0, STATE_OFF = 1, STATE_ON = 2 it will also generate: kUnknown = STATE_UNKNOWN, kOff = STATE_OFF, kOn = STATE_ON }; Change-Id: Ifff30034cffce52cdee665320bc24a08fec72194 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/92042 Pigweed-Auto-Submit: Scott James Remnant <[email protected]> Commit-Queue: Auto-Submit <[email protected]> Reviewed-by: Keir Mierle <[email protected]>
- Loading branch information
Showing
4 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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