mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-02 12:22:08 +03:00
Change circuit_definition to circuit in leo.pest
This commit is contained in:
parent
3df120f9d0
commit
c9d3f8615e
@ -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>>,
|
||||
|
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user