2021-01-04 15:00:48 -05:00
|
|
|
#ifndef COMPILER_UTIL_H
|
|
|
|
#define COMPILER_UTIL_H
|
|
|
|
#include "vm-lines.h"
|
|
|
|
#include "compiler-scopes.h"
|
|
|
|
#include "compiler.h"
|
|
|
|
|
|
|
|
/* compiler-util
|
|
|
|
* Random utilities used in the compiler module. */
|
|
|
|
|
|
|
|
#define mkln(id) mksimpleln(id, strcount(id))
|
|
|
|
|
|
|
|
LINE* onetoken(char* str);
|
|
|
|
LINE* mksimpleln(char** tokens, int count);
|
|
|
|
|
2021-01-06 19:18:52 -05:00
|
|
|
LINE* pushvarraw(SCOPE* s, VAR* v);
|
|
|
|
LINE* pushvar(SCOPE* s, DEBUGINFO* d, const char* name);
|
|
|
|
LINE* popvar(SCOPE* s, DEBUGINFO* d, const char* name);
|
2021-01-04 15:00:48 -05:00
|
|
|
LINE* poptemp();
|
|
|
|
LINE* popthatadd();
|
|
|
|
|
|
|
|
#endif
|