about summary refs log tree commit diff stats
path: root/400.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-04 22:27:12 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-04 23:02:53 -0800
commiteea6659a40b48e23cb660276248c7310ab879613 (patch)
treeb7ff986d51bd035283b9699fa6820ad7156b486e /400.mu
parent273c42c06698f3e010739923714feba780a4c9cf (diff)
downloadmu-eea6659a40b48e23cb660276248c7310ab879613.tar.gz
7331 - hacky way to convert slice to string
Diffstat (limited to '400.mu')
-rw-r--r--400.mu5
1 files changed, 5 insertions, 0 deletions
diff --git a/400.mu b/400.mu
index 23e3ce2d..d766a8f6 100644
--- a/400.mu
+++ b/400.mu
@@ -94,7 +94,9 @@ sig slice-equal? s: (addr slice), p: (addr array byte) -> _/eax: boolean
 sig slice-starts-with? s: (addr slice), head: (addr array byte) -> _/eax: boolean
 sig write-slice out: (addr stream byte), s: (addr slice)
 sig write-slice-buffered out: (addr buffered-file), s: (addr slice)
+# bad name alert
 sig slice-to-string ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte)
+sig _slice-to-string in: (addr slice), out: (addr handle array byte)
 sig next-token in: (addr stream byte), delimiter: byte, out: (addr slice)
 sig next-token-from-slice start: (addr byte), end: (addr byte), delimiter: byte, out: (addr slice)
 sig skip-chars-matching in: (addr stream byte), delimiter: byte
@@ -113,6 +115,9 @@ sig write-stream-data f: (addr buffered-file), s: (addr stream byte)
 sig write-int32-decimal out: (addr stream byte), n: int
 sig is-decimal-digit? c: grapheme -> _/eax: boolean
 sig to-decimal-digit in: grapheme -> _/eax: int
+# bad name alert
+# next-word really tokenizes
+# next-raw-word really reads whitespace-separated words
 sig next-word line: (addr stream byte), out: (addr slice)  # skips '#' comments
 sig next-raw-word line: (addr stream byte), out: (addr slice)  # does not skip '#' comments
 sig has-metadata? word: (addr slice), s: (addr string) -> _/eax: boolean