activation.hpp 949 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef AFUN_ACTIVATION_HPP
  2. #define AFUN_ACTIVATION_HPP
  3. #include "tool.hpp"
  4. #include "aFunCoreExport.h"
  5. namespace aFuncore {
  6. class Activation;
  7. class TopActivation;
  8. }
  9. #include "msg.hpp"
  10. #include "code.hpp"
  11. #include "inter.hpp"
  12. #include "var.hpp"
  13. namespace aFuncore {
  14. class Activation {
  15. protected:
  16. Activation *prev;
  17. Inter *inter;
  18. UpMessage *up;
  19. DownMessage *down;
  20. VarList *varlist;
  21. VarList *old_varlist;
  22. StringFilePath path;
  23. FileLine line;
  24. public:
  25. Activation(Inter *inter_, Activation *prev_);
  26. virtual ~Activation();
  27. virtual Code *getCode()=0;
  28. [[nodiscard]] StringFilePath getFilePath() const {return path;}
  29. [[nodiscard]] FileLine getFileLine() const {return line;}
  30. };
  31. class TopActivation {
  32. Code *start;
  33. Code *next;
  34. public:
  35. Code *getCode();
  36. };
  37. }
  38. #endif //AFUN_ACTIVATION_HPP