Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljklein committed Jan 25, 2024
1 parent b04ec5f commit da2d7f8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions compiler/noirc_frontend/src/parser/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,12 @@ fn struct_definition() -> impl NoirParser<TopLevelStatement> {
))
.or(just(Semicolon).to(Vec::new()));

attributes()
.then_ignore(keyword(Struct))
.then(ident())
.then(generics())
.then(fields)
.validate(|(((raw_attributes, name), generics), fields), span, emit| {
attributes().then_ignore(keyword(Struct)).then(ident()).then(generics()).then(fields).validate(
|(((raw_attributes, name), generics), fields), span, emit| {
let attributes = validate_struct_attributes(raw_attributes, span, emit);
TopLevelStatement::Struct(NoirStruct { name, attributes, generics, fields, span })
})
},
)
}

fn type_alias_definition() -> impl NoirParser<TopLevelStatement> {
Expand Down

0 comments on commit da2d7f8

Please sign in to comment.