about summary refs log tree commit diff stats
path: root/shell/tokenize.mu
diff options
context:
space:
mode:
Diffstat (limited to 'shell/tokenize.mu')
-rw-r--r--shell/tokenize.mu7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell/tokenize.mu b/shell/tokenize.mu
index 1293e91f..46ca0a6b 100644
--- a/shell/tokenize.mu
+++ b/shell/tokenize.mu
@@ -624,6 +624,13 @@ fn number-token? _in: (addr cell) -> _/eax: boolean {
 
 fn bracket-token? _in: (addr cell) -> _/eax: boolean {
   var in/eax: (addr cell) <- copy _in
+  {
+    var in-type/eax: (addr int) <- get in, type
+    compare *in-type, 3/stream
+    break-if-!=
+    # streams are never paren tokens
+    return 0/false
+  }
   var in-data-ah/eax: (addr handle stream byte) <- get in, text-data
   var in-data/eax: (addr stream byte) <- lookup *in-data-ah
   rewind-stream in-data