aFunlang.h 1.1 KB

12345678910111213141516171819202122
  1. #ifndef AFUN_AFUNLANG_H
  2. #define AFUN_AFUNLANG_H
  3. #include "aFunlangExport.h"
  4. #include "aFunCore.h"
  5. #include "runtime.h"
  6. AFUN_LANG_EXPORT bool aFunInit(void);
  7. AFUN_LANG_EXPORT af_Environment *creatAFunEnviroment(int argc, char **argv);
  8. AFUN_LANG_EXPORT void destructAFunEnvironment(af_Environment *env);
  9. /* 源文件运行 */
  10. AFUN_LANG_EXPORT int runCodeFromString(char *code, char *string_name, FILE *error_file, int mode, af_Environment *env);
  11. AFUN_LANG_EXPORT int runCodeFromFileSource(FilePath file, FILE *error_file, bool save_afb, FilePath save_path, int mode,
  12. af_Environment *env);
  13. AFUN_LANG_EXPORT int runCodeFromStdin(char *name, FILE *error_file, af_Environment *env);
  14. AFUN_LANG_EXPORT int runCodeFromMemory(af_Code *code, int mode, af_Environment *env);
  15. AFUN_LANG_EXPORT int runCodeFromFileByte(FilePath file, FILE *error_file, int mode, af_Environment *env);
  16. AFUN_LANG_EXPORT int runCodeFromFile(FilePath file, FILE *error_file, bool save_afb, int mode, af_Environment *env);
  17. AFUN_LANG_EXPORT int buildFile(FilePath out, FilePath in, FILE *error_file);
  18. #endif //AFUN_AFUNLANG_H