From 74f1512ff113cf35706af57e9d40c78b7d77f49e Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 7 Feb 2021 00:17:17 -0800 Subject: 7690 Convert comments about magic constants into metadata. --- apps/tile/word.mu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/tile/word.mu') 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 -- cgit 1.4.1-2-gfad0