diff --git a/ast/src/circuits/circuit.rs b/ast/src/circuits/circuit.rs index 6ce3be0eb4..1fea0bd3d9 100644 --- a/ast/src/circuits/circuit.rs +++ b/ast/src/circuits/circuit.rs @@ -4,7 +4,7 @@ use pest::Span; use pest_ast::FromPest; #[derive(Clone, Debug, FromPest, PartialEq)] -#[pest_ast(rule(Rule::circuit_definition))] +#[pest_ast(rule(Rule::circuit))] pub struct Circuit<'ast> { pub identifier: Identifier<'ast>, pub members: Vec>, diff --git a/ast/src/leo.pest b/ast/src/leo.pest index caaefc02cd..7bef959cc0 100644 --- a/ast/src/leo.pest +++ b/ast/src/leo.pest @@ -4,7 +4,7 @@ assignee = { identifier ~ access_assignee* } // Declared in common/file.rs -file = { SOI ~ NEWLINE* ~ import* ~ NEWLINE* ~ circuit_definition* ~ NEWLINE* ~ function_definition* ~ NEWLINE* ~ test_function* ~ NEWLINE* ~ EOI } +file = { SOI ~ NEWLINE* ~ import* ~ NEWLINE* ~ circuit* ~ NEWLINE* ~ function_definition* ~ NEWLINE* ~ test_function* ~ NEWLINE* ~ EOI } // Declared in common/identifier.rs identifier = @{ ((!protected_name ~ ASCII_ALPHA) | (protected_name ~ (ASCII_ALPHANUMERIC | "_"))) ~ (ASCII_ALPHANUMERIC | "_")* } @@ -177,7 +177,7 @@ access_static_member = { "::" ~ identifier } /// Circuits // Declared in circuits/circuit_definition.rs -circuit_definition = { "circuit" ~ identifier ~ "{" ~ NEWLINE* ~ circuit_member* ~ NEWLINE* ~ "}" ~ NEWLINE* } +circuit = { "circuit" ~ identifier ~ "{" ~ NEWLINE* ~ circuit_member* ~ NEWLINE* ~ "}" ~ NEWLINE* } // Declared in circuits/circuit_field.rs circuit_field = { identifier ~ ":" ~ expression }