12345678910111213141516171819202122232425262728293031323334 |
- #ifndef FUNCTIONS_H
- #define FUNCTIONS_H
- #include <stdbool.h>
- #include "DataType.h"
- #define FUNCTION_ARGUMENTS 9
- typedef struct {
- const char* name;
- int arguments;
- DataType argumentTypes[FUNCTION_ARGUMENTS];
- DataType returnType;
- int address;
- int size;
- int line;
- } Function;
- typedef struct {
- int capacity;
- int entries;
- Function* data;
- } Functions;
- void fInit(Function* f, const char* name, int line);
- bool fAddArgument(Function* f, DataType type);
- void fsInit(Functions* fs);
- void fsDelete(Functions* fs);
- Function* fsSearch(Functions* fs, Function* f);
- void fsAdd(Functions* fs, Function* f);
- #endif
|