From d0a0cc820985eaa900de7a9c28f12d89491eba0a Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 4 Jun 2018 19:12:48 -0700 Subject: [PATCH] Rename ast_reducing -> reduced_ast --- schala-lang/src/eval.rs | 2 +- schala-lang/src/lib.rs | 6 +++--- schala-lang/src/{ast_reducing.rs => reduced_ast.rs} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename schala-lang/src/{ast_reducing.rs => reduced_ast.rs} (100%) diff --git a/schala-lang/src/eval.rs b/schala-lang/src/eval.rs index dfdbe90..053cb4d 100644 --- a/schala-lang/src/eval.rs +++ b/schala-lang/src/eval.rs @@ -6,7 +6,7 @@ use std::io; use itertools::Itertools; use util::StateStack; -use ast_reducing::{ReducedAST, Stmt, Expr, Lit, Func}; +use reduced_ast::{ReducedAST, Stmt, Expr, Lit, Func}; use symbol_table::{SymbolSpec, Symbol, SymbolTable}; pub struct State<'a> { diff --git a/schala-lang/src/lib.rs b/schala-lang/src/lib.rs index 176b8fd..7da7aeb 100644 --- a/schala-lang/src/lib.rs +++ b/schala-lang/src/lib.rs @@ -26,7 +26,7 @@ mod tokenizing; mod parsing; mod symbol_table; mod typechecking; -mod ast_reducing; +mod reduced_ast; mod eval; #[derive(ProgrammingLanguageInterface)] @@ -116,13 +116,13 @@ fn typechecking(handle: &mut Schala, input: parsing::AST, comp: Option<&mut Unfi } } -fn ast_reducing(_handle: &mut Schala, input: parsing::AST, comp: Option<&mut UnfinishedComputation>) -> Result { +fn ast_reducing(_handle: &mut Schala, input: parsing::AST, comp: Option<&mut UnfinishedComputation>) -> Result { let output = input.reduce(); comp.map(|comp| comp.add_artifact(TraceArtifact::new("ast_reducing", format!("{:?}", output)))); Ok(output) } -fn eval(handle: &mut Schala, input: ast_reducing::ReducedAST, comp: Option<&mut UnfinishedComputation>) -> Result { +fn eval(handle: &mut Schala, input: reduced_ast::ReducedAST, comp: Option<&mut UnfinishedComputation>) -> Result { comp.map(|comp| comp.add_artifact(TraceArtifact::new("value_state", handle.state.debug_print()))); let evaluation_outputs = handle.state.evaluate(input, true); let text_output: Result, String> = evaluation_outputs diff --git a/schala-lang/src/ast_reducing.rs b/schala-lang/src/reduced_ast.rs similarity index 100% rename from schala-lang/src/ast_reducing.rs rename to schala-lang/src/reduced_ast.rs