| 2 | #include <string.h> |
| 3 | |
| 4 | CBMScope* cbm_scope_push(CBMArena* a, CBMScope* current) { |
| 5 | CBMScope* scope = (CBMScope*)cbm_arena_alloc(a, sizeof(CBMScope)); |
| 6 | if (!scope) { |
| 7 | return current; |
| 8 | } |
| 9 | memset(scope, 0, sizeof(CBMScope)); |
| 10 | scope->parent = current; |
| 11 | scope->arena = a; |
| 12 | return scope; |
| 13 | } |
| 14 | |
| 15 | CBMScope* cbm_scope_pop(CBMScope* scope) { |
| 16 | if (!scope) { |
no test coverage detected