Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nucleo-64-rtfm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Lindgren
nucleo-64-rtfm
Commits
30aa70de
Commit
30aa70de
authored
7 years ago
by
Per Lindgren
Browse files
Options
Downloads
Patches
Plain Diff
with file output in klee directory
parent
56477acc
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
macros/src/lib.rs
+15
-3
15 additions, 3 deletions
macros/src/lib.rs
tasks.txt
+2
-0
2 additions, 0 deletions
tasks.txt
with
17 additions
and
3 deletions
macros/src/lib.rs
+
15
−
3
View file @
30aa70de
//! 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
()
...
...
This diff is collapsed.
Click to expand it.
tasks.txt
0 → 100644
+
2
−
0
View file @
30aa70de
// autogenertated file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment