harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 62e8ec7b902300ba15b6b0a3b93f4da92a6321bd
parent c8762ac1e64a9301843a3a5b1a801bc2847789a3
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 30 Dec 2020 10:30:26 -0500

lex: fix error with names at the end of the file

Diffstat:
Msrc/lex.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lex.c b/src/lex.c @@ -236,13 +236,10 @@ lex_name(struct lexer *lexer, struct token *out) while ((c = next(lexer, NULL, true)) != UTF8_INVALID) { if (c > 0x7F || (!isalnum(c) && c != '_')) { push(lexer, c, true); - goto lookup; + break; } } - out->token = T_EOF; - return out->token; -lookup:; void *token = bsearch(&lexer->buf, tokens, T_LAST_KEYWORD + 1, sizeof(tokens[0]), cmp_keyword); if (!token) {