mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-25 03:19:34 +01:00
extern examples added
This commit is contained in:
parent
d11b2ddd35
commit
0f8e173614
3 changed files with 32 additions and 27 deletions
|
@ -22,5 +22,6 @@ proc-macro2 = "1"
|
|||
proc-macro-error = "1"
|
||||
quote = "1"
|
||||
syn = "1"
|
||||
rtic-syntax = { git = "https://github.com/rtic-rs/rtic-syntax", branch = "master", version = "0.5.0-alpha.0" }
|
||||
#rtic-syntax = { git = "https://github.com/rtic-rs/rtic-syntax", branch = "master", version = "0.5.0-alpha.0" }
|
||||
rtic-syntax = { git = "https://github.com/rtic-rs/rtic-syntax", branch = "extern_task", version = "0.5.0-alpha.0" }
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ pub fn codegen(
|
|||
locals_pat = Some(pat);
|
||||
}
|
||||
|
||||
if !&task.is_extern {
|
||||
let attrs = &task.attrs;
|
||||
let context = &task.context;
|
||||
let stmts = &task.stmts;
|
||||
|
@ -109,6 +110,7 @@ pub fn codegen(
|
|||
}
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
(mod_app, root, user_tasks)
|
||||
}
|
||||
|
|
|
@ -99,6 +99,7 @@ pub fn codegen(
|
|||
root.push(struct_);
|
||||
}
|
||||
|
||||
if !&task.is_extern {
|
||||
let context = &task.context;
|
||||
let attrs = &task.attrs;
|
||||
let cfgs = &task.cfgs;
|
||||
|
@ -114,6 +115,7 @@ pub fn codegen(
|
|||
#(#stmts)*
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
root.push(module::codegen(
|
||||
Context::SoftwareTask(name),
|
||||
|
|
Loading…
Reference in a new issue