Skip to content

Commit

Permalink
allow lowercase field type
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Nov 29, 2023
1 parent 87a302f commit ee70cc4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/noirc_frontend/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ impl fmt::Display for Keyword {
Keyword::Dep => write!(f, "dep"),
Keyword::Distinct => write!(f, "distinct"),
Keyword::Else => write!(f, "else"),
Keyword::Field => write!(f, "Field"),
Keyword::Field => write!(f, "field"),
Keyword::Fn => write!(f, "fn"),
Keyword::For => write!(f, "for"),
Keyword::FormatString => write!(f, "fmtstr"),
Expand Down Expand Up @@ -735,7 +735,11 @@ impl Keyword {
"dep" => Keyword::Dep,
"distinct" => Keyword::Distinct,
"else" => Keyword::Else,
// Currently we allow both uppercase and lowercase
// Fields. This will be used as a transition solution
// where we eventually deprecate the uppercase variant.
"Field" => Keyword::Field,
"field" => Keyword::Field,
"fn" => Keyword::Fn,
"for" => Keyword::For,
"fmtstr" => Keyword::FormatString,
Expand Down

0 comments on commit ee70cc4

Please sign in to comment.