This commit is contained in:
Motiejus Jakštys
2025-04-24 20:32:51 +00:00
parent b089809dd1
commit a13b698a7d

View File

@@ -50,7 +50,8 @@ static void cleanupScratch(CleanupScratch* c) { c->scratch->len = c->old_len; }
static AstSubRange listToSpan(
Parser* p, const AstNodeIndex* list, uint32_t count) {
SLICE_ENSURE_CAPACITY(AstNodeIndex, &p->extra_data, count);
memcpy(p->extra_data.arr + p->extra_data.len, list, count * sizeof(AstNodeIndex));
memcpy(p->extra_data.arr + p->extra_data.len, list,
count * sizeof(AstNodeIndex));
p->extra_data.len += count;
return (AstSubRange) {
.start = p->extra_data.len - count,
@@ -464,7 +465,7 @@ static AstTokenIndex expectToken(Parser* p, TokenizerTag tag) {
return 0; // tcc
}
static AstNodeIndex expectSemicolon(Parser *p) {
static AstNodeIndex expectSemicolon(Parser* p) {
return expectToken(p, TOKEN_SEMICOLON);
}