Refactor AssignmentKind to allow backpassing on both let and expect.
The 3rd kind of assignment kind (Bind) is gone and now reflected through a boolean parameter. Note that this parameter is completely erased by the type-checker so that the rest of the pipeline (i.e. code-generation) doesn't have to make any assumption. They simply can't see a backpassing let or expect.
This commit is contained in:
@@ -4,8 +4,8 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
ast::{
|
||||
AssignmentKind, BinOp, ClauseGuard, Constant, DataTypeKey, FunctionAccessKey, Pattern,
|
||||
Span, TraceLevel, TypedArg, TypedClause, TypedClauseGuard, TypedDataType, TypedPattern,
|
||||
BinOp, ClauseGuard, Constant, DataTypeKey, FunctionAccessKey, Pattern, Span, TraceLevel,
|
||||
TypedArg, TypedAssignmentKind, TypedClause, TypedClauseGuard, TypedDataType, TypedPattern,
|
||||
UnOp,
|
||||
},
|
||||
builtins::{bool, data, function, int, list, void},
|
||||
@@ -68,7 +68,7 @@ pub enum HoistableFunction {
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct AssignmentProperties {
|
||||
pub value_type: Rc<Type>,
|
||||
pub kind: AssignmentKind,
|
||||
pub kind: TypedAssignmentKind,
|
||||
pub remove_unused: bool,
|
||||
pub full_check: bool,
|
||||
pub msg_func: Option<AirMsg>,
|
||||
|
||||
Reference in New Issue
Block a user