summaryrefslogtreecommitdiffstats
path: root/src/state.h
blob: 5071342e5c2b7984072eaee11f2ab4e15fb4efa8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef CCMMC_HEADER_STATE_H
#define CCMMC_HEADER_STATE_H

#include "ast.h"
#include "symbol-table.h"
#include "register.h"

#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>

// All states of the compiler instance
typedef struct CcmmcState_struct {
    CcmmcAst *ast;
    CcmmcSymbolTable *table;
    size_t line_number;
    FILE *asm_output;
    CcmmcRegPool *reg_pool;
} CcmmcState;

void             ccmmc_state_init                   (CcmmcState *state);
void             ccmmc_state_fini                   (CcmmcState *state);

#endif
// vim: set sw=4 ts=4 sts=4 et: