inter.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 LinkValue *base_father;
  10. struct VarList *var_list;
  11. struct InterData{
  12. struct Value *object;
  13. struct Value *none;
  14. FILE *debug;
  15. FILE *error;
  16. char *log_dir; // 记录log文件夹的位置
  17. char *var_str_prefix;
  18. char *var_num_prefix;
  19. char *var_defualt;
  20. char *object_init;
  21. char *object_enter;
  22. char *object_exit;
  23. } data;
  24. };
  25. typedef struct Inter Inter;
  26. typedef struct Statement Statement;
  27. Inter *makeInter(char *debug, struct LinkValue *father);
  28. void freeInter(Inter *inter, bool show_gc);
  29. void setBaseInterData(struct Inter *inter);
  30. int runCodeBlock(char *code_file, Inter *inter);
  31. void runParser(char *code_file, Inter *inter, Statement **st);
  32. void runCode(Statement *st, Inter *inter);
  33. void mergeInter(Inter *new, Inter *base);
  34. #endif //VIRTUALMATH_INTER_H