about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--baremetal/shell/read.mu3
1 files changed, 3 insertions, 0 deletions
diff --git a/baremetal/shell/read.mu b/baremetal/shell/read.mu
index 8fdf4714..03ee6d10 100644
--- a/baremetal/shell/read.mu
+++ b/baremetal/shell/read.mu
@@ -69,6 +69,7 @@ fn next-token in: (addr gap-buffer), out: (addr stream byte), trace: (addr trace
   var stream-storage: (stream byte 0x40)
   var stream/eax: (addr stream byte) <- address stream-storage
   write stream, "=> "
+  rewind-stream out
   write-stream stream, out
   trace trace, "read", stream
 }
@@ -105,6 +106,7 @@ fn next-symbol-token in: (addr gap-buffer), out: (addr stream byte), trace: (add
   var stream-storage: (stream byte 0x40)
   var stream/esi: (addr stream byte) <- address stream-storage
   write stream, "=> "
+  rewind-stream out
   write-stream stream, out
   trace trace, "read", stream
 }
@@ -155,6 +157,7 @@ fn next-bracket-token g: grapheme, out: (addr stream byte), trace: (addr trace)
   var stream-storage: (stream byte 0x40)
   var stream/esi: (addr stream byte) <- address stream-storage
   write stream, "=> "
+  rewind-stream out
   write-stream stream, out
   trace trace, "read", stream
 }