about summary refs log tree commit diff stats
path: root/baremetal/shell/read.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-21 22:28:35 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-21 22:28:35 -0800
commite3f7765cb791c45513c67aadc0abc4865831b1c5 (patch)
tree1b11e5d79b76f349abcced91c35501008b672d0b /baremetal/shell/read.mu
parent87fe53e691d3bbd78fa5c3d25e0228b469802040 (diff)
downloadmu-e3f7765cb791c45513c67aadc0abc4865831b1c5.tar.gz
7780
Start trimming whitespace from the input.

It's probably a bad idea to rebuild all our primitives for gap buffers.
Diffstat (limited to 'baremetal/shell/read.mu')
-rw-r--r--baremetal/shell/read.mu1
1 files changed, 1 insertions, 0 deletions
diff --git a/baremetal/shell/read.mu b/baremetal/shell/read.mu
index b6446b55..81dd6f07 100644
--- a/baremetal/shell/read.mu
+++ b/baremetal/shell/read.mu
@@ -21,6 +21,7 @@ fn read-cell in: (addr gap-buffer), out: (addr handle cell) {
 
 fn next-token in: (addr gap-buffer), out: (addr stream byte) {
   clear-stream out
+  skip-whitespace-from-gap-buffer in
   {
     var done?/eax: boolean <- gap-buffer-scan-done? in
     compare done?, 0/false