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-07-03 18:27:01 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-07-03 18:27:01 -0700
commitc95648c96093ce0d44c21191bab0ee2c9b04becc (patch)
treeeb58e435a158100b99e152199b193acc53df4ab3 /shell/tokenize.mu
parent7ced4e44ddb6e15152eb8bcef9dda68aba53710b (diff)
downloadmu-c95648c96093ce0d44c21191bab0ee2c9b04becc.tar.gz
reading from streams
The Mu shell has no string literals, only streams. No random access,
only sequential access. But I've been playing fast and loose with its
read pointer until now. Hopefully things are cleaned up now.
Diffstat (limited to 'shell/tokenize.mu')
-rw-r--r--shell/tokenize.mu2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/tokenize.mu b/shell/tokenize.mu
index 6ebf5e46..e097e460 100644
--- a/shell/tokenize.mu
+++ b/shell/tokenize.mu
@@ -638,7 +638,7 @@ fn next-stream-token in: (addr gap-buffer), _out: (addr token), trace: (addr tra
     var stream/esi: (addr stream byte) <- address stream-storage
     write stream, "=> "
     rewind-stream out-data
-    write-stream stream, out-data
+    write-stream-immutable stream, out-data
     trace trace, "tokenize", stream
   }
 }