forked from M-Labs/nac3
composer part fixes and cleanup
This commit is contained in:
parent
26059208ff
commit
2c390572d2
|
@ -2140,14 +2140,17 @@ impl TopLevelComposer {
|
|||
{
|
||||
let subkernel_dest = keywords.iter().find(|keyword| {
|
||||
if keyword.node.arg == Some("destination".into()) {
|
||||
if let ExprKind::Constant { value, .. } = &keyword.node.value.node {
|
||||
return true;
|
||||
match &keyword.node.value.node {
|
||||
ExprKind::Constant { .. } => true,
|
||||
_ => false
|
||||
}
|
||||
} else {
|
||||
false
|
||||
}
|
||||
false
|
||||
}
|
||||
).node.value.node.value;
|
||||
if let Some(Constant::Int(sk_dest)) == subkernel_dest {
|
||||
// treat subkernel as kernel if the destination is the same as currently compiled
|
||||
if let Some(Constant::Int(sk_dest)) = subkernel_dest {
|
||||
if sk_dest != destination.unwrap_or(0) {
|
||||
instance_to_symbol.insert(String::new(), simple_name.to_string());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue