Cast.h 511 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef QLOW_SEM_CAST_H
  2. #define QLOW_SEM_CAST_H
  3. #include <memory>
  4. #include "Type.h"
  5. namespace qlow
  6. {
  7. namespace sem
  8. {
  9. // forward declaration
  10. class Type;
  11. class Cast;
  12. }
  13. }
  14. class qlow::sem::Cast
  15. {
  16. public:
  17. Type* to;
  18. bool isExplicit;
  19. inline Cast(Type* to) :
  20. to{ to },
  21. isExplicit{ true }
  22. {
  23. }
  24. inline Cast(Type* to, bool isExplicit) :
  25. to{ to },
  26. isExplicit{ isExplicit }
  27. {
  28. }
  29. };
  30. #endif // QLOW_SEM_CAST_H