foxp/src/process.h
2024-06-10 19:14:53 +05:00

49 lines
584 B
C

#include <stdbool.h>
#include "syntax.h"
typedef enum {
REPLACE,
FUNCTION
} tProcessingType;
typedef struct {
char* replacethis;
tSyntaxElement* replacewiththis;
} tProcessingReplace;
typedef struct {
char* name;
int argc;
char** argv;
tSyntaxElement* body;
} tProcessingFunction;
typedef union {
tProcessingReplace replace;
tProcessingFunction function;
} tuProcessingData;
typedef struct ProcessingData {
struct ProcessingData* prev;
tProcessingType type;
tuProcessingData data;
} tProcessingData;
void process(tSyntaxElement*, tProcessingData*);