func-import.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef AFUN_FUNC_IMPORT_H
  2. #define AFUN_FUNC_IMPORT_H
  3. #include "aFunlangExport.h"
  4. #include "aFuncore.h"
  5. namespace aFunit {
  6. class ImportFunction : 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. std::string import;
  12. public:
  13. CallFunc(const aFuncore::Code::ByteCode *code_, aFuncore::Inter &inter_);
  14. std::list<ArgCodeList> *getArgCodeList(aFuncore::Inter &inter_,
  15. aFuncore:: Activation &activation,
  16. const aFuncore::Code::ByteCode *call) override;
  17. void runFunction() override;
  18. ~CallFunc() override;
  19. };
  20. public:
  21. inline explicit ImportFunction(aFuncore::Inter &inter_);
  22. inline explicit ImportFunction(aFuncore::Environment &env_);
  23. ~ImportFunction() override = default;
  24. CallFunction *getCallFunction(const aFuncore::Code::ByteCode *code, aFuncore::Inter &inter) override;
  25. };
  26. }
  27. #include "func-import.inline.h"
  28. #endif //AFUN_FUNC_IMPORT_H