nac3core: style
This commit is contained in:
parent
6f9f455152
commit
d6ab73afb0
@ -90,7 +90,8 @@ pub fn gen_assign<'ctx, 'a, G: CodeGenerator>(
|
||||
target: &Expr<Option<Type>>,
|
||||
value: ValueEnum<'ctx>,
|
||||
) {
|
||||
if let ExprKind::Tuple { elts, .. } = &target.node {
|
||||
match &target.node {
|
||||
ExprKind::Tuple { elts, .. } => {
|
||||
if let BasicValueEnum::StructValue(v) = value.to_basic_value_enum(ctx, generator) {
|
||||
for (i, elt) in elts.iter().enumerate() {
|
||||
let v = ctx
|
||||
@ -102,8 +103,7 @@ pub fn gen_assign<'ctx, 'a, G: CodeGenerator>(
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
} else {
|
||||
match &target.node {
|
||||
}
|
||||
ExprKind::Subscript { value: ls, slice, .. }
|
||||
if matches!(&slice.node, ExprKind::Slice { .. }) =>
|
||||
{
|
||||
@ -150,7 +150,6 @@ pub fn gen_assign<'ctx, 'a, G: CodeGenerator>(
|
||||
ctx.builder.build_store(ptr, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn gen_for<'ctx, 'a, G: CodeGenerator>(
|
||||
|
Loading…
Reference in New Issue
Block a user