inter.h 948 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef VIRTUALMATH_INTER_H
  2. #define VIRTUALMATH_INTER_H
  3. struct Result;
  4. struct Inter{
  5. struct Value *base;
  6. struct LinkValue *link_base;
  7. struct HashTable *hash_base;
  8. struct Var *base_var;
  9. struct VarList *var_list;
  10. struct InterData{
  11. FILE *debug;
  12. FILE *error;
  13. char *log_dir; // 记录log文件夹的位置
  14. char *var_str_prefix;
  15. char *var_num_prefix;
  16. char *var_defualt;
  17. char *object_init;
  18. char *object_enter;
  19. char *object_exit;
  20. } data;
  21. };
  22. typedef struct Inter Inter;
  23. typedef struct Statement Statement;
  24. Inter *makeInter(char *debug);
  25. void freeInter(Inter *inter, bool show_gc);
  26. void setBaseInterData(struct Inter *inter);
  27. int runCodeBlock(char *code_file, Inter *inter);
  28. void runParser(char *code_file, Inter *inter, Statement **st);
  29. void runCode(Statement *st, Inter *inter);
  30. void mergeInter(Inter *new, Inter *base);
  31. #endif //VIRTUALMATH_INTER_H