diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-04-27 23:10:30 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-04-27 23:10:30 -0700 |
commit | 55cde01edfe504855f171b6dbdc312cbcc02872b (patch) | |
tree | e39ebe42c53e6a8e906319faf6d318f4f6f6837d /shell/tokenize.mu | |
parent | 9e9e40c05a1a6df71f57f98044da4258ac013b5c (diff) | |
download | mu-55cde01edfe504855f171b6dbdc312cbcc02872b.tar.gz |
shell: stream literals
Diffstat (limited to 'shell/tokenize.mu')
-rw-r--r-- | shell/tokenize.mu | 7 |
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 |