rt-inter.cpp 532 B

12345678910111213141516171819
  1. #include "rt-inter.h"
  2. #include "func-exit.h"
  3. #include "func-import.h"
  4. namespace aFunrt {
  5. aFunEnvironment::aFunEnvironment(int argc, char **argv) : Environment(argc, argv) {
  6. { // 退出函数
  7. auto exit = new ExitFunction(*this);
  8. protect->defineVar("exit", exit);
  9. exit->delReference();
  10. }
  11. { // 导入函数
  12. auto import = new ImportFunction(*this);
  13. protect->defineVar("import", import);
  14. import->delReference();
  15. }
  16. }
  17. }