Skip to content
Snippets Groups Projects
Commit 30aa70de authored by Per Lindgren's avatar Per Lindgren
Browse files

with file output in klee directory

parent 56477acc
No related branches found
No related tags found
No related merge requests found
//! Procedural macros of the `cortex-m-rtfm` crate
#![deny(warnings)]
//#![deny(warnings)]
#![feature(proc_macro)]
#![recursion_limit = "128"]
......@@ -10,6 +10,9 @@ extern crate proc_macro;
extern crate quote;
extern crate rtfm_syntax as syntax;
extern crate syn;
use std::fs::File;
use std::io::{Read, Write};
use std::path::PathBuf;
use proc_macro::TokenStream;
use syntax::App;
......@@ -181,8 +184,17 @@ fn run(ts: TokenStream) -> Result<TokenStream> {
let ownerships = analyze::app(&app);
let tokens = trans::app(&app, &ownerships);
println!("here we are");
println!("{:?}", app.tasks);
println!("tasks");
let mut tasks = Vec::new();
for (id, _task) in app.tasks {
println!("{}", id);
tasks.push(format!("{}", id));
}
let path = std::path::Path::new("klee/tasks.txt");
let mut file = File::create(path).unwrap();
write!(file, "// autogenertated file \n {:?}", tasks).unwrap();
Ok(format!("{}", tokens)
.parse()
......
// autogenertated file
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment