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:
@@ -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 {
|
||||
|
||||
@@ -28,7 +28,9 @@ Module {
|
||||
location: 17..18,
|
||||
name: "x",
|
||||
},
|
||||
kind: Let,
|
||||
kind: Let {
|
||||
backpassing: false,
|
||||
},
|
||||
annotation: None,
|
||||
},
|
||||
Var {
|
||||
|
||||
@@ -26,7 +26,9 @@ Module {
|
||||
location: 17..18,
|
||||
name: "x",
|
||||
},
|
||||
kind: Let,
|
||||
kind: Let {
|
||||
backpassing: false,
|
||||
},
|
||||
annotation: None,
|
||||
},
|
||||
Var {
|
||||
|
||||
Reference in New Issue
Block a user