about summary refs log tree commit diff stats
path: root/apps/tile/word.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-02-07 00:17:17 -0800
committerKartik Agaram <vc@akkartik.com>2021-02-07 00:20:29 -0800
commit74f1512ff113cf35706af57e9d40c78b7d77f49e (patch)
tree7c7acb23e1a26387117e464ec6ab01126dbc8ae8 /apps/tile/word.mu
parent6c4c25555c7df0d78ad41c813345f63cae1819de (diff)
downloadmu-74f1512ff113cf35706af57e9d40c78b7d77f49e.tar.gz
7690
Convert comments about magic constants into metadata.
Diffstat (limited to 'apps/tile/word.mu')
-rw-r--r--apps/tile/word.mu12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/tile/word.mu b/apps/tile/word.mu
index 2d776caf..224c876c 100644
--- a/apps/tile/word.mu
+++ b/apps/tile/word.mu
@@ -61,7 +61,7 @@ fn move-word-contents _src-ah: (addr handle word), _dest-ah: (addr handle word)
   var src-stack/ecx: (addr grapheme-stack) <- get src-data, right
   {
     var done?/eax: boolean <- grapheme-stack-empty? src-stack
-    compare done?, 0  # false
+    compare done?, 0/false
     break-if-!=
     var g/eax: grapheme <- pop-grapheme-stack src-stack
 #?     print-grapheme 0, g
@@ -520,7 +520,7 @@ fn word-exists? _haystack-ah: (addr handle word), _needle: (addr word) -> _/ebx:
   compare curr, 0
   {
     break-if-!=
-    return 0  # false
+    return 0/false
   }
   # check curr
   var curr-name-storage: (handle array byte)
@@ -531,7 +531,7 @@ fn word-exists? _haystack-ah: (addr handle word), _needle: (addr word) -> _/ebx:
   compare found?, 0
   {
     break-if-=
-    return 1  # true
+    return 1/true
   }
   # recurse
   var curr/eax: (addr word) <- lookup *haystack-ah
@@ -550,7 +550,7 @@ fn word-list-length words: (addr handle word) -> _/eax: int {
     {
       var word-len/eax: int <- word-length curr
       result <- add word-len
-      result <- add 1  # inter-word-margin
+      result <- add 1/inter-word-margin
     }
     curr-ah <- get curr, next
     loop
@@ -566,12 +566,12 @@ fn parse-words in: (addr array byte), out-ah: (addr handle word) {
   var cursor-word-ah/ebx: (addr handle word) <- copy out-ah
   $parse-words:loop: {
     var done?/eax: boolean <- stream-empty? in-stream-a
-    compare done?, 0  # false
+    compare done?, 0/false
     break-if-!=
     var _g/eax: grapheme <- read-grapheme in-stream-a
     var g/ecx: grapheme <- copy _g
     # if not space, insert
-    compare g, 0x20  # space
+    compare g, 0x20/space
     {
       break-if-=
       var cursor-word/eax: (addr word) <- lookup *cursor-word-ah