2
0

func-exit.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef AFUN_FUNC_EXIT_H
  2. #define AFUN_FUNC_EXIT_H
  3. #include "aFunlangExport.h"
  4. #include "aFuncore.h"
  5. namespace aFunit {
  6. class ExitFunction : public aFuncore::Function {
  7. class CallFunc : public CallFunction {
  8. const aFuncore::Code::ByteCode *call_code;
  9. aFuncore::Inter &inter;
  10. std::list<ArgCodeList> *acl;
  11. public:
  12. CallFunc(const aFuncore::Code::ByteCode *code_, aFuncore::Inter &inter_);
  13. std::list<ArgCodeList> *getArgCodeList(aFuncore::Inter &inter_,
  14. aFuncore:: Activation &activation,
  15. const aFuncore::Code::ByteCode *call) override;
  16. void runFunction() override;
  17. ~CallFunc() override;
  18. };
  19. public:
  20. inline explicit ExitFunction(aFuncore::Inter &inter_);
  21. inline explicit ExitFunction(aFuncore::Environment &env_);
  22. ~ExitFunction() override = default;
  23. CallFunction *getCallFunction(const aFuncore::Code::ByteCode *code, aFuncore::Inter &inter) override;
  24. };
  25. }
  26. #include "func-exit.inline.h"
  27. #endif //AFUN_FUNC_EXIT_H