fmt
This commit is contained in:
5
parser.c
5
parser.c
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user