fix(generator): avoid constant name duplication of mask and value

This commit is contained in:
Wataru Otsubo 2025-03-27 18:22:30 +09:00
parent fa777f43fb
commit 5c7aa91d56
2 changed files with 5 additions and 1 deletions

View file

@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed block, register type definitions to support multiple backends. See [the merge request at mpsoc software](https://gitlab.cern.ch/wotsubo/mpsoc-software/-/merge_requests/9) for more information.
### Fixed
- Avoid mask and value constant name duplication by inserting `_VAL_` to value constants.
## [0.2.0] - 2025-02-12
### Added

View file

@ -322,7 +322,7 @@ fn generate_single_ux_field(
fn custom_value_const_name(field_name: &Ident, value_name: &str) -> Ident {
util::parse_to_ident(&format!(
"{}_{}",
"{}_VAL_{}",
field_name.to_string().to_shouty_snake_case(),
value_name.to_shouty_snake_case()
))