feat: function insertion IR done, code gen will be easy

This commit is contained in:
Kasey White
2022-11-29 13:37:16 -05:00
committed by Lucas
parent 4129cf92c9
commit 02ee129615
4 changed files with 413 additions and 78 deletions

View File

@@ -51,8 +51,8 @@ pub type Datum {
pub fn spend(datum: Datum, _rdmr: Nil, _ctx: Nil) -> Bool {
when datum is {
Offer { price, thing: t, .. } -> price > 0
Offer { price, thing: t, .. } -> add_one(price) > 0
Hold(less) -> less < 0
Sell -> False
Sell -> add_one(1) > 1
}
}