resolve todos

This commit is contained in:
collin 2021-02-01 11:42:34 -08:00
parent f259828097
commit aa01421bdf
3 changed files with 2 additions and 5 deletions

View File

@ -31,7 +31,7 @@ use indexmap::IndexMap;
use std::{cell::RefCell, sync::Arc};
use uuid::Uuid;
/// Stores the Leo program abstract syntax graph (asg).
/// Stores the Leo program abstract semantic graph (asg).
#[derive(Clone)]
pub struct InnerProgram {
/// The unique id of the program.
@ -332,7 +332,7 @@ impl Iterator for InternalIdentifierGenerator {
Some(out)
}
}
/// TODO (protryon): Please add comments
/// Returns an ast from the given asg program.
pub fn reform_ast(program: &Program) -> leo_ast::Program {
let mut all_programs: IndexMap<String, Program> = IndexMap::new();
let mut program_stack = program.borrow().imported_modules.clone();

View File

@ -174,7 +174,6 @@ impl InnerScope {
///
/// Returns a new scope given a parent scope.
/// TODO (protryon): Rename this method to "new()" ?
///
pub fn make_subscope(scope: &Scope) -> Scope {
Arc::new(RefCell::new(InnerScope {

View File

@ -38,14 +38,12 @@ pub enum Type {
Circuit(Arc<Circuit>),
}
/// TODO (@protryon): Please provide comments.
#[derive(Clone)]
pub enum WeakType {
Type(Type), // circuit not allowed
Circuit(Weak<Circuit>),
}
/// TODO (@protryon): Please provide comments.
#[derive(Clone, PartialEq)]
pub enum PartialType {
Type(Type), // non-array or tuple