hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 63921cc5a0dc36be515fc5515b767fd8ac626cf5
parent 2f81442d51d7c1f7b9c0c287afdafe93dc674e2c
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sun, 20 Mar 2022 00:24:24 -0400

lex: use lex_unicode buffer with length 8 instead of 9

I assume the extra byte was a leftover from when strings had null
terminators.

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mhare/lex/lex.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hare/lex/lex.ha b/hare/lex/lex.ha @@ -154,7 +154,7 @@ fn ncmp(a: const *void, b: const *void) int = { fn lex_unicode(lex: *lexer, loc: location, n: size) (rune | error) = { assert(n < 9); - let buf: [9]u8 = [0...]; + let buf: [8]u8 = [0...]; for (let i = 0z; i < n; i += 1z) { let r = match (next(lex)?) { case io::EOF =>