about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-26 21:29:41 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-26 21:29:41 -0800
commit7f496b840a8d59ca14e16da007a8cb4752668cb2 (patch)
tree5fcb5d0bf22d73101f0cbbbbc41be237a5fcad9c
parent9b09ecfd82e1306244ab54ddec77384b2f81434b (diff)
downloadmu-7f496b840a8d59ca14e16da007a8cb4752668cb2.tar.gz
7811
-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
 }