You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[move] Added restricted identifier syntax. New 2024 keywords (#14108)
## Description
- Added syntax to make identifiers from any keyword, e.g. ``let `false`
= true;``
- `mut` and `enum` are keywords in 2024.
- This also adds support for spaces between `&` and `mut`, i.e. `& mut
x.f` was not previously parsed
## Test Plan
Added new tests
---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.
### Type of Change (Check all that apply)
- [ ] protocol change
- [X] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration
### Release notes
In Move 2024 edition, some previously accepted identifiers will now be
keywords. With this change, `mut` and `enum` will be keywords. `mut` as
a keyword will allow spaces between `&` and `mut`, which will also cause
less ambiguity with the introduction of `let mut` variable declarations.
To help with any migrations, syntax has been added to allow for the
declarations of identifiers that are keywords, e.g. ``let `struct` = S
{};`` or ``let `false` = false;``.
More keywords may be reserved in 2024 edition.
0 commit comments