Change circuit_definition to circuit in leo.pest

This commit is contained in:
howardwu 2020-06-20 00:58:04 -07:00
parent 3df120f9d0
commit c9d3f8615e
2 changed files with 3 additions and 3 deletions

View File

@ -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<CircuitMember<'ast>>,

View File

@ -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 }