fix another underflow in ast.zig#fullWhile() (#853)

This commit is contained in:
travisstaloch 2022-12-26 21:45:52 -08:00 committed by GitHub
parent faae689ff7
commit 3139a787a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,9 +173,9 @@ fn fullWhile(tree: Ast, info: full.While.Components) full.While {
tok_i -= 1; tok_i -= 1;
} }
if (token_tags[tok_i] == .colon and if (token_tags[tok_i] == .colon and
token_tags[tok_i - 1] == .identifier) token_tags[tok_i -| 1] == .identifier)
{ {
result.label_token = tok_i - 1; result.label_token = tok_i -| 1;
} }
const last_cond_token = lastToken(tree, info.cond_expr); const last_cond_token = lastToken(tree, info.cond_expr);
if (token_tags[last_cond_token + 2] == .pipe) { if (token_tags[last_cond_token + 2] == .pipe) {