commit 2f81442d51d7c1f7b9c0c287afdafe93dc674e2c
parent c1e2be1961d9c7cc2a0d0825397c1dd5fb277194
Author: Sebastian <sebastian@sebsite.pw>
Date: Sun, 20 Mar 2022 00:24:20 -0400
lex: handle try() failure in lex_unicode
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hare/lex/lex.ha b/hare/lex/lex.ha
@@ -659,8 +659,8 @@ fn lex3(lex: *lexer) (token | error) = {
let r = next(lex)? as (rune, location);
let toks = switch (r.0) {
case '.' =>
- let tok = if (try(lex, '.') is void) ltok::DOT
- else if (try(lex, '.') is void) ltok::SLICE
+ let tok = if (try(lex, '.')? is void) ltok::DOT
+ else if (try(lex, '.')? is void) ltok::SLICE
else ltok::ELLIPSIS;
return (tok, void, r.1);
case '<' =>