From 4ca57e4aea989bf43667c0e092b902b99aad467a Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 15 Jul 2018 15:01:50 -0700 Subject: [PATCH] Change name of debug options struct --- schala-lang/src/parsing.rs | 2 +- schala-repl/src/language.rs | 8 ++++---- schala-repl/src/lib.rs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/schala-lang/src/parsing.rs b/schala-lang/src/parsing.rs index d2491d5..db3d72d 100644 --- a/schala-lang/src/parsing.rs +++ b/schala-lang/src/parsing.rs @@ -20,7 +20,7 @@ pub struct ParseError { impl ParseError { fn new(msg: &str) -> ParseResult { - Err(ParseError { + Err(ParseError { msg: msg.to_string(), token: None }) diff --git a/schala-repl/src/language.rs b/schala-repl/src/language.rs index 500a65a..1808d3a 100644 --- a/schala-repl/src/language.rs +++ b/schala-repl/src/language.rs @@ -7,7 +7,7 @@ pub struct LLVMCodeString(pub String); #[derive(Debug, Default, Serialize, Deserialize)] pub struct EvalOptions { pub execution_method: ExecutionMethod, - pub debug_passes: HashMap, + pub debug_passes: HashMap, } #[derive(Debug, Hash, PartialEq)] @@ -17,7 +17,7 @@ pub struct PassDescriptor { } #[derive(Debug, Serialize, Deserialize)] -pub struct PassDebugDescriptor { +pub struct PassDebugOptionsDescriptor { pub opts: Vec, } @@ -164,12 +164,12 @@ macro_rules! pass_chain { macro_rules! pass_chain_helper { (($state:expr, $comp:expr, $options:expr); $input:expr, $pass:path $(, $rest:path)*) => { { - use schala_repl::PassDebugDescriptor; + use schala_repl::PassDebugOptionsDescriptor; let pass_name = stringify!($pass); let output = { let ref debug_map = $options.debug_passes; let debug_handle = match debug_map.get(pass_name) { - Some(PassDebugDescriptor { opts }) => { //(Some(&mut $comp), Some(opts.clone())), + Some(PassDebugOptionsDescriptor { opts }) => { //(Some(&mut $comp), Some(opts.clone())), let ptr = &mut $comp; ptr.cur_debug_options = opts.clone(); Some(ptr) diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index bba5ecb..2382b5b 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -34,7 +34,7 @@ const VERSION_STRING: &'static str = "0.1.0"; include!(concat!(env!("OUT_DIR"), "/static.rs")); pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, - ExecutionMethod, TraceArtifact, FinishedComputation, UnfinishedComputation, PassDebugDescriptor, PassDescriptor}; + ExecutionMethod, TraceArtifact, FinishedComputation, UnfinishedComputation, PassDebugOptionsDescriptor, PassDescriptor}; pub type PLIGenerator = Box Box + Send + Sync>; @@ -113,7 +113,7 @@ fn run_noninteractive(filename: &str, languages: Vec