Fix derive code

This commit is contained in:
greg 2018-07-16 19:36:55 -07:00
parent 38eb065511
commit 250c486143
2 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ pub fn derive_programming_language_interface(input: TokenStream) -> TokenStream
//let pass_names: Vec<String> = passes.iter().map(|pass| pass.0.to_string()).collect();
let pass_descriptors = passes.iter().map(|pass| {
let name: String = pass.0.to_string();
let name = pass.0.to_string();
let opts: Vec<String> = match &pass.1 {
None => vec![],
Some(opts) => opts.iter().map(|o| o.to_string()).collect(),
@ -74,7 +74,7 @@ pub fn derive_programming_language_interface(input: TokenStream) -> TokenStream
quote! {
PassDescriptor {
name: #name,
name: #name.to_string(),
debug_options: vec![#(format!(#opts)),*]
}
}

View File

@ -31,7 +31,7 @@ mod typechecking;
mod reduced_ast;
mod eval;
trace_macros!(true);
//trace_macros!(true);
#[derive(ProgrammingLanguageInterface)]
#[LanguageName = "Schala"]
#[SourceFileExtension = "schala"]