mirror of
https://github.com/usatiuk/psil.git
synced 2025-10-29 03:07:49 +01:00
put more stuff in consutils
This commit is contained in:
@@ -9,11 +9,12 @@
|
||||
#include <cstdint>
|
||||
|
||||
enum class CellType {
|
||||
NIL,
|
||||
INT,
|
||||
CONS
|
||||
};
|
||||
|
||||
using CellValType = int64_t;
|
||||
|
||||
struct Cell {
|
||||
explicit Cell(CellType type) : _type(type) {}
|
||||
virtual ~Cell() = 0;
|
||||
@@ -24,9 +25,9 @@ struct Cell {
|
||||
|
||||
struct ValueCell : public Cell {
|
||||
ValueCell() = delete;
|
||||
explicit ValueCell(int64_t val) : Cell(CellType::INT), _val(val) {}
|
||||
explicit ValueCell(CellValType val) : Cell(CellType::INT), _val(val) {}
|
||||
|
||||
int64_t _val;
|
||||
CellValType _val;
|
||||
};
|
||||
|
||||
struct ConsCell : public Cell {
|
||||
|
||||
Reference in New Issue
Block a user