diff options
-rw-r--r-- | shell/tokenize.mu | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/shell/tokenize.mu b/shell/tokenize.mu index d40ca2bb..d591646c 100644 --- a/shell/tokenize.mu +++ b/shell/tokenize.mu @@ -557,13 +557,15 @@ fn quote-token? _in: (addr cell) -> _/eax: boolean { fn open-paren-token? _in: (addr cell) -> _/eax: boolean { var in/eax: (addr cell) <- copy _in var in-data-ah/eax: (addr handle stream byte) <- get in, text-data - var in-data/eax: (addr stream byte) <- lookup *in-data-ah + var _in-data/eax: (addr stream byte) <- lookup *in-data-ah + var in-data/ecx: (addr stream byte) <- copy _in-data rewind-stream in-data var g/eax: grapheme <- read-grapheme in-data compare g, 0x28/open-paren { break-if-!= - return 1/true + var result/eax: boolean <- stream-empty? in-data + return result } return 0/false } @@ -571,13 +573,15 @@ fn open-paren-token? _in: (addr cell) -> _/eax: boolean { fn close-paren-token? _in: (addr cell) -> _/eax: boolean { var in/eax: (addr cell) <- copy _in var in-data-ah/eax: (addr handle stream byte) <- get in, text-data - var in-data/eax: (addr stream byte) <- lookup *in-data-ah + var _in-data/eax: (addr stream byte) <- lookup *in-data-ah + var in-data/ecx: (addr stream byte) <- copy _in-data rewind-stream in-data var g/eax: grapheme <- read-grapheme in-data - compare g, 0x29/open-paren + compare g, 0x29/close-paren { break-if-!= - return 1/true + var result/eax: boolean <- stream-empty? in-data + return result } return 0/false } |