mirror of
https://gitlab.cern.ch/wotsubo/endcap-sl-software-ri-generator.git
synced 2025-04-20 11:46:04 +09:00
fix(generator): avoid constant name duplication of mask and value
This commit is contained in:
parent
fa777f43fb
commit
5c7aa91d56
2 changed files with 5 additions and 1 deletions
|
@ -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.
|
- 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
|
## [0.2.0] - 2025-02-12
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -322,7 +322,7 @@ fn generate_single_ux_field(
|
||||||
|
|
||||||
fn custom_value_const_name(field_name: &Ident, value_name: &str) -> Ident {
|
fn custom_value_const_name(field_name: &Ident, value_name: &str) -> Ident {
|
||||||
util::parse_to_ident(&format!(
|
util::parse_to_ident(&format!(
|
||||||
"{}_{}",
|
"{}_VAL_{}",
|
||||||
field_name.to_string().to_shouty_snake_case(),
|
field_name.to_string().to_shouty_snake_case(),
|
||||||
value_name.to_shouty_snake_case()
|
value_name.to_shouty_snake_case()
|
||||||
))
|
))
|
||||||
|
|
Loading…
Add table
Reference in a new issue