mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-13 06:43:01 +03:00
Improve doc comments for compiler phases
This commit is contained in:
parent
4da923eec4
commit
2fdcb043fc
@ -66,7 +66,7 @@ use leo_grammar::Grammar;
|
||||
/// The [`LeoAst`] 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.
|
||||
///
|
||||
/// A new [`LeoAst`] can be created from a [`Grammar`] generated by the pest parser in the `ast` module.
|
||||
/// A new [`LeoAst`] can be created from a [`Grammar`] generated by the pest parser in the `grammar` module.
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
pub struct LeoAst {
|
||||
ast: Program,
|
||||
|
@ -14,7 +14,9 @@
|
||||
// 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/>.
|
||||
|
||||
//! Module containing structs and types that make up a Leo program.
|
||||
//! The compiler for Leo programs.
|
||||
//!
|
||||
//! The [`Compiler`] type compiles Leo programs into R1CS circuits.
|
||||
|
||||
#![allow(clippy::module_inception)]
|
||||
|
||||
|
@ -59,7 +59,8 @@ use std::{fs, path::Path};
|
||||
/// The [`Grammar`] type represents a Leo program as a series of recursive data types.
|
||||
/// These data types form a tree that begins from a [`File`] type root.
|
||||
///
|
||||
/// A new [`Grammar`] can be created from a `*.leo` file at a [`Path`].
|
||||
/// A new [`Grammar`] type can be created from a `*.leo` file at a [`Path`].
|
||||
/// A [`Grammar`] type can be used to create a new [`LeoAst`] type.
|
||||
pub struct Grammar<'ast> {
|
||||
ast: files::File<'ast>,
|
||||
}
|
||||
|
@ -18,6 +18,9 @@
|
||||
//!
|
||||
//! This module contains the [`SymbolTable`] type, an abstract data type that tracks the current
|
||||
//! bindings for functions and circuits in a Leo program.
|
||||
//!
|
||||
//! A new [`Symbol Table`] type can be created from a reference to a [`LeoAst`].
|
||||
//! A [`Symbol Table`] type can be used to create a new [`TypeInference`] type.
|
||||
|
||||
#[macro_use]
|
||||
extern crate thiserror;
|
||||
|
@ -18,6 +18,8 @@
|
||||
//!
|
||||
//! This module contains the [`TypeInference`] type, which stores information needed to run a type
|
||||
//! inference check over a program.
|
||||
//!
|
||||
//! A new [`TypeInference`] type can be created from a [`LeoAst`] type and a [`Symbol Table`].
|
||||
|
||||
#[macro_use]
|
||||
extern crate thiserror;
|
||||
|
Loading…
Reference in New Issue
Block a user