add virtual destructors to expr and assertion

This commit is contained in:
Benji Dial 2023-12-25 14:38:37 -05:00
parent 8723fe0781
commit 3ed235ac0b

View file

@ -60,6 +60,7 @@ namespace lib94 {
//this abstract class represents expression fields extracted in stage 2 and evaluted in stage 4.
class expr {
public:
virtual ~expr() = default;
unsigned source_line_number;
number_t offset;
virtual intermediate_t evaluate(const label_offset_set &label_offsets) const = 0;
@ -68,6 +69,7 @@ namespace lib94 {
//this abstract class represents assertions fields extracted in stage 1 and evaluated in stage 3
class assertion {
public:
virtual ~assertion() = default;
unsigned source_line_number;
virtual bool check(const label_offset_set &label_offsets) const = 0;
};