updated and better file descirptions

This commit is contained in:
gluax 2022-02-17 12:54:19 -08:00
parent ec11c2adaf
commit 89569e658e
5 changed files with 19 additions and 2 deletions

View File

@ -14,6 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
//! Creates a struct that implements a ReconstructingReducer
//! such that it applies changes to the AST nodes for canonicalization.
//! An example of these changes are transforming Self -> to the circuit name.
use leo_ast::*;
use leo_errors::{AstError, Result};
use leo_span::{sym, Span, Symbol};

View File

@ -14,6 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
//! Implements the AstPass trait for the Canonicalizer
//! which is a ReconstructingReducer trait to canonicalize AST nodes.
//! This allows for easy calling of the Canonicalization pass.
pub mod canonicalizer;
pub use canonicalizer::*;

View File

@ -14,6 +14,11 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
//! This module contains both a Director to reconstruct the AST
//! which maps over ever node of the AST and calls a reducer.
//! The Trait for a reducer are methods that can be overridden
//! to make changes to how AST nodes are rebuilt.
pub mod reconstructing_reducer;
pub use reconstructing_reducer::*;

View File

@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
//! This module contains the reducer which iterates through ast nodes - converting them into
//! asg nodes and saving relevant information.
//! This module contains a Director for how to map over the AST
//! and applies a reducer call to each node.
use crate::*;

View File

@ -14,6 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
//! This module contains a Reducer Trait for the AST.
//! It implements default methods for each node to be made
//! given the information of the old node.
use crate::*;
use leo_errors::Result;