Skip to content

Commit

Permalink
Reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhsnn committed Dec 22, 2024
1 parent e2d0a93 commit bdd208a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -4576,6 +4576,13 @@ Obj *parse(Token *tok) {
Obj head = {0};
Obj *cur = &head;
while (tok->kind != TK_EOF) {
if (equal_kw(tok, "asm") || equal(tok, "__asm") || equal(tok, "__asm__")) {
cur = cur->next = calloc(1, sizeof(Obj));
cur->asm_str = str_tok(&tok, skip(tok->next, "("));
tok = skip(tok, ")");
continue;
}

arena_on(&node_arena);

if (equal(tok, "_Static_assert") || equal_kw(tok, "static_assert")) {
Expand All @@ -4586,14 +4593,6 @@ Obj *parse(Token *tok) {
continue;
}

if (equal_kw(tok, "asm") || equal(tok, "__asm") || equal(tok, "__asm__")) {
cur = cur->next = calloc(1, sizeof(Obj));
cur->asm_str = str_tok(&tok, skip(tok->next, "("));
tok = skip(tok, ")");
arena_off(&node_arena);
continue;
}

VarAttr attr = {0};
Type *basety = declspec(&tok, tok, &attr);

Expand Down

0 comments on commit bdd208a

Please sign in to comment.