Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: Reserve enum and match keywords #6961

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions compiler/noirc_frontend/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ pub enum Keyword {
CtString,
Dep,
Else,
Enum,
Expr,
Field,
Fn,
Expand All @@ -1033,6 +1034,7 @@ pub enum Keyword {
Impl,
In,
Let,
Match,
Mod,
Module,
Mut,
Expand Down Expand Up @@ -1079,6 +1081,7 @@ impl fmt::Display for Keyword {
Keyword::CtString => write!(f, "CtString"),
Keyword::Dep => write!(f, "dep"),
Keyword::Else => write!(f, "else"),
Keyword::Enum => write!(f, "enum"),
Keyword::Expr => write!(f, "Expr"),
Keyword::Field => write!(f, "Field"),
Keyword::Fn => write!(f, "fn"),
Expand All @@ -1090,6 +1093,7 @@ impl fmt::Display for Keyword {
Keyword::Impl => write!(f, "impl"),
Keyword::In => write!(f, "in"),
Keyword::Let => write!(f, "let"),
Keyword::Match => write!(f, "match"),
Keyword::Mod => write!(f, "mod"),
Keyword::Module => write!(f, "Module"),
Keyword::Mut => write!(f, "mut"),
Expand Down Expand Up @@ -1139,6 +1143,7 @@ impl Keyword {
"CtString" => Keyword::CtString,
"dep" => Keyword::Dep,
"else" => Keyword::Else,
"enum" => Keyword::Enum,
"Expr" => Keyword::Expr,
"Field" => Keyword::Field,
"fn" => Keyword::Fn,
Expand All @@ -1150,6 +1155,7 @@ impl Keyword {
"impl" => Keyword::Impl,
"in" => Keyword::In,
"let" => Keyword::Let,
"match" => Keyword::Match,
"mod" => Keyword::Mod,
"Module" => Keyword::Module,
"mut" => Keyword::Mut,
Expand Down
Loading