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:
KtorZ
2024-03-10 23:04:07 +01:00
parent df898bf239
commit 435dd0d213
27 changed files with 198 additions and 113 deletions

View File

@@ -23,7 +23,9 @@ Module {
location: 19..20,
name: "a",
},
kind: Let,
kind: Let {
backpassing: false,
},
annotation: None,
},
UInt {
@@ -61,7 +63,9 @@ Module {
location: 56..57,
name: "a",
},
kind: Let,
kind: Let {
backpassing: false,
},
annotation: None,
},
UInt {
@@ -110,7 +114,9 @@ Module {
location: 93..94,
name: "a",
},
kind: Let,
kind: Let {
backpassing: false,
},
annotation: None,
},
doc: None,
@@ -155,7 +161,9 @@ Module {
location: 126..127,
name: "a",
},
kind: Let,
kind: Let {
backpassing: false,
},
annotation: None,
},
BinOp {

View File

@@ -28,7 +28,9 @@ Module {
location: 17..18,
name: "x",
},
kind: Let,
kind: Let {
backpassing: false,
},
annotation: None,
},
Var {

View File

@@ -26,7 +26,9 @@ Module {
location: 17..18,
name: "x",
},
kind: Let,
kind: Let {
backpassing: false,
},
annotation: None,
},
Var {