From 96c20c6472febbb71caeda53d66820c05141bf2f Mon Sep 17 00:00:00 2001 From: howardwu Date: Thu, 4 Feb 2021 17:26:52 -0800 Subject: [PATCH] Update ast convention --- ast/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 514be205cd..5347d1328a 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -63,7 +63,7 @@ pub use node::*; use leo_grammar::Grammar; -/// The abstract syntax tree (ast) for a Leo program. +/// The abstract syntax tree (AST) for a Leo program. /// /// The [`Ast`] type represents a Leo program as a series of recursive data types. /// These data types form a tree that begins from a [`Program`] type root. @@ -75,14 +75,14 @@ pub struct Ast { } impl Ast { - /// Creates a new ast from a given program name and grammar tree. - pub fn new<'ast>(program_name: &str, ast: &Grammar<'ast>) -> Result { + /// Creates a new AST from a given program name and grammar tree. + pub fn new<'ast>(program_name: &str, grammar: &Grammar<'ast>) -> Result { Ok(Self { - ast: Program::from(program_name, ast.as_repr())?, + ast: Program::from(program_name, grammar.as_repr())?, }) } - /// Returns a reference to the inner program ast representation. + /// Returns a reference to the inner program AST representation. pub fn into_repr(self) -> Program { self.ast }