2023-12-11 17:01:22 +00:00
|
|
|
#ifndef RZ_PREPASS_H
|
|
|
|
#define RZ_PREPASS_H
|
|
|
|
|
|
|
|
#include "commons.h"
|
|
|
|
#include "err.h"
|
|
|
|
#include "node.h"
|
2023-12-17 18:10:17 +00:00
|
|
|
#include "sym.h"
|
|
|
|
#include "tysolver.h"
|
2023-12-20 19:54:58 +00:00
|
|
|
#include "tysy.h"
|
2023-12-11 17:01:22 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2023-12-17 18:10:17 +00:00
|
|
|
sym_t* sym;
|
2023-12-20 19:54:58 +00:00
|
|
|
tysy_t* tysy;
|
2023-12-17 18:10:17 +00:00
|
|
|
tysolver_t* tysolver;
|
2023-12-11 17:01:22 +00:00
|
|
|
err_t* err;
|
2023-12-23 20:17:12 +00:00
|
|
|
int* id;
|
2023-12-18 13:19:38 +00:00
|
|
|
int scope;
|
|
|
|
|
2023-12-11 17:01:22 +00:00
|
|
|
} prepass_t;
|
|
|
|
|
2023-12-17 18:10:17 +00:00
|
|
|
void prepass_init(prepass_t* prepass,
|
2023-12-23 20:17:12 +00:00
|
|
|
int* id,
|
2023-12-17 18:10:17 +00:00
|
|
|
sym_t* sym,
|
2023-12-20 19:54:58 +00:00
|
|
|
tysy_t* tysy,
|
2023-12-17 18:10:17 +00:00
|
|
|
tysolver_t* tysolver,
|
|
|
|
err_t* err);
|
|
|
|
|
2023-12-11 17:01:22 +00:00
|
|
|
void prepass_free(prepass_t* prepass);
|
|
|
|
|
|
|
|
void prepass_run(prepass_t* prepass, node_t* node);
|
|
|
|
|
|
|
|
#endif
|