forked from M-Labs/nac3
1
0
Fork 0

composer part fixes and cleanup

This commit is contained in:
mwojcik 2024-11-01 16:54:26 +08:00
parent 26059208ff
commit 2c390572d2
1 changed files with 7 additions and 4 deletions

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