diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-11-06 02:46:44 +0100 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-11-06 12:17:01 +0100 |
commit | 3e51be9d94e561549281e386ce1b7554018ef4dd (patch) | |
tree | a88f20aba911030f16e692351cf5489746917910 /token.c | |
parent | f66a661359a39e10af01508ad02429517b8460e3 (diff) |
cproc: Implement defer statement.defer
implemented by keeping a list of deferred blocks in a function, and
emitting them before scope exits (return, lbracket, break, continue)
TODO: error checking, the compiler should error should a compile time
jump (goto) would go over a defer statement.
Diffstat (limited to 'token.c')
-rw-r--r-- | token.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -22,6 +22,7 @@ const char *tokstr[] = { [TCONSTEXPR] = "constexpr", [TCONTINUE] = "continue", [TDEFAULT] = "default", + [TDEFER] = "defer", [TDO] = "do", [TDOUBLE] = "double", [TELSE] = "else", |