1
0
forked from M-Labs/nac3

composer part fixes and cleanup

This commit is contained in:
mwojcik 2024-11-01 16:54:26 +08:00
parent 660bfeae85
commit 80b15d5566

View File

@ -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());
}