about summary refs log tree commit diff stats
path: root/shell/tokenize.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-06 15:46:54 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-06 16:42:08 -0700
commita54c6f2ee7bff0c7d459c4a3cede660ed02a5072 (patch)
tree854f57ba7dcba68f9160aa9e1b59c215a2c8230f /shell/tokenize.mu
parenteffbe423a71cbc02d525bb9978d92d57041ca751 (diff)
downloadmu-a54c6f2ee7bff0c7d459c4a3cede660ed02a5072.tar.gz
belatedly migrate stale example definitions
Also bare-bones syntax highlighting for .limg files. Doesn't work when
.limg file is first file opened with Vim.
Diffstat (limited to 'shell/tokenize.mu')
-rw-r--r--shell/tokenize.mu6
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/tokenize.mu b/shell/tokenize.mu
index 0d6fdd6e..7572ffba 100644
--- a/shell/tokenize.mu
+++ b/shell/tokenize.mu
@@ -9,13 +9,15 @@ fn tokenize in: (addr gap-buffer), out: (addr stream cell), trace: (addr trace)
   var token-storage: cell
   var token/edx: (addr cell) <- address token-storage
   {
+#?     draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen "a", 7/fg 0/bg
     skip-whitespace-from-gap-buffer in
     var done?/eax: boolean <- gap-buffer-scan-done? in
     compare done?, 0/false
     break-if-!=
+#?     draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen "b", 7/fg 0/bg
     # initialize token data each iteration to avoid aliasing
     var dest-ah/eax: (addr handle stream byte) <- get token, text-data
-    populate-stream dest-ah, 0x100/max-definition-size
+    populate-stream dest-ah, 0x400/max-definition-size
     #
     next-token in, token, trace
     var skip?/eax: boolean <- comment-token? token
@@ -27,7 +29,9 @@ fn tokenize in: (addr gap-buffer), out: (addr stream cell), trace: (addr trace)
       break-if-=
       return
     }
+#?     draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen "y", 7/fg 0/bg
     write-to-stream out, token  # shallow-copy text-data
+#?     draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen "z", 7/fg 0/bg
     loop
   }
   trace-higher trace