diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-06-17 00:05:38 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-06-17 00:29:22 -0700 |
commit | dd66068298b0a11f2a1f195376cba98e0c8570b5 (patch) | |
tree | 06696728fd65cdf38a2ac571943e130e9d60c333 /same-fringe.mu | |
parent | b89b822439f47a490a1b764e14a1ed1b73059cba (diff) | |
download | mu-dd66068298b0a11f2a1f195376cba98e0c8570b5.tar.gz |
4261 - start using literals for 'true' and 'false'
They uncovered one bug: in edit/003-shortcuts.mu <scroll-down> was returning 0 for an address in one place where I thought it was returning 0 for a boolean. Now we've eliminated this bad interaction between tangling and punning literals.
Diffstat (limited to 'same-fringe.mu')
-rw-r--r-- | same-fringe.mu | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/same-fringe.mu b/same-fringe.mu index a1e619b7..b9235006 100644 --- a/same-fringe.mu +++ b/same-fringe.mu @@ -38,7 +38,7 @@ def same-fringe a:&:tree:_elem, b:&:tree:_elem -> result:bool [ break-if a-done? break-if b-done? match?:bool <- equal x, y - return-unless match?, 0/false + return-unless match?, false loop } result <- and a-done?, b-done? @@ -51,8 +51,8 @@ def process t:&:tree:_elem [ return-continuation-until-mark 100/mark # initial traverse t zero-val:&:_elem <- new _elem:type - return-continuation-until-mark 100/mark, *zero-val, 1/done # final - assert 0/false, [continuation called past done] + return-continuation-until-mark 100/mark, *zero-val, true/done # final + assert false, [continuation called past done] ] # core traversal @@ -68,7 +68,7 @@ def traverse t:&:tree:_elem [ return-if r # leaf v:_elem <- get *t, val:offset - return-continuation-until-mark 100/mark, v, 0/not-done + return-continuation-until-mark 100/mark, v, false/not-done ] # details |