Kill old DebugOptions struct

This commit is contained in:
greg
2018-05-05 21:08:04 -07:00
parent 890e6bd4c5
commit d524389f1d
3 changed files with 4 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ impl<'a> ProgrammingLanguageInterface for Maaru<'a> {
let tokens = match tokenizer::tokenize(input) {
Ok(tokens) => {
if options.debug.tokens {
if let Some(_) = options.debug_passes.get("tokens") {
output.add_artifact(TraceArtifact::new("tokens", format!("{:?}", tokens)));
}
tokens
@@ -59,7 +59,7 @@ impl<'a> ProgrammingLanguageInterface for Maaru<'a> {
let ast = match parser::parse(&tokens, &[]) {
Ok(ast) => {
if options.debug.ast {
if let Some(_) = options.debug_passes.get("ast") {
output.add_artifact(TraceArtifact::new("ast", format!("{:?}", ast)));
}
ast