hare

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

commit 36011547815dcf6f5f1217227ccb9fd896d63bb5
parent 717e3968a525bb368b395522793c72c69b849e03
Author: Sebastian <sebastian@sebsite.pw>
Date:   Fri,  4 Aug 2023 00:33:32 -0400

hare::lex: add static assertion for bmap length

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

Diffstat:
Mhare/lex/token.ha | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/hare/lex/token.ha b/hare/lex/token.ha @@ -281,6 +281,9 @@ const bmap: [_]str = [ "*=", ]; +// XXX: get rid of @test fn once top-level static assertions are supported +@test fn bmaplen() void = static assert(len(bmap) == ltok::LAST_BTOK: size + 1); + // A token value, used for tokens such as '1337' (an integer). export type value = (str | rune | u64 | f64 | void);