foxp/src/process.h

35 lines
548 B
C
Raw Normal View History

2024-06-09 16:39:12 +00:00
#include <stdbool.h>
#include "syntax.h"
2024-06-09 19:38:22 +00:00
typedef enum {
REPLACE,
FUNCTION
} tProcessingType;
typedef struct {
2024-06-09 16:39:12 +00:00
char* replacethis;
tSyntaxElement* replacewiththis;
2024-06-09 19:38:22 +00:00
} tProcessingReplace;
typedef struct {
char** args;
tSyntaxElement* body;
} tProcessingFunction;
typedef union {
tProcessingReplace replace;
tProcessingFunction function;
} tuProcessingData;
typedef struct ProcessingData {
struct ProcessingData* prev;
tProcessingType type;
tuProcessingData data;
2024-06-09 16:39:12 +00:00
} tProcessingData;
void process(tSyntaxElement*, tProcessingData*);