Skip to content

Commit

Permalink
chore!: reserve unchecked keyword (#4432)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

There's a decent chance that we're going to add some form of unchecked
maths in future so I'd like to reserve this keyword in preparation for
that.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Feb 27, 2024
1 parent 97bcae2 commit 9544813
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/noirc_frontend/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ pub enum Keyword {
Struct,
Trait,
Type,
Unchecked,
Unconstrained,
Use,
Where,
Expand Down Expand Up @@ -715,6 +716,7 @@ impl fmt::Display for Keyword {
Keyword::Struct => write!(f, "struct"),
Keyword::Trait => write!(f, "trait"),
Keyword::Type => write!(f, "type"),
Keyword::Unchecked => write!(f, "unchecked"),
Keyword::Unconstrained => write!(f, "unconstrained"),
Keyword::Use => write!(f, "use"),
Keyword::Where => write!(f, "where"),
Expand Down Expand Up @@ -760,6 +762,7 @@ impl Keyword {
"struct" => Keyword::Struct,
"trait" => Keyword::Trait,
"type" => Keyword::Type,
"unchecked" => Keyword::Unchecked,
"unconstrained" => Keyword::Unconstrained,
"use" => Keyword::Use,
"where" => Keyword::Where,
Expand Down

0 comments on commit 9544813

Please sign in to comment.