basic printers, type printers, some fixes, part of expression printers

This commit is contained in:
ProgramSnail 2023-07-24 18:47:57 +03:00
parent 3914ff7d8b
commit 3669084f55
14 changed files with 795 additions and 39 deletions

View file

@ -8,11 +8,11 @@
namespace nodes {
enum class Modifier {
OUT, // -> x
IN, // <- x
REF, // <> x
OR_FALSE, // x?
OR_PANIC, // x!
OUT, // -> x
IN, // <- x
REF, // <> x
OR_FALSE, // x?
OR_RETURN, // x!
NONE,
};
@ -53,6 +53,16 @@ public:
return std::nullopt;
}
std::variant<double, long long, std::string, char, bool, unit, null> *
get_any() {
return &value_;
}
const std::variant<double, long long, std::string, char, bool, unit, null> *
get_any() const {
return &value_;
}
private:
std::variant<double, long long, std::string, char, bool, unit, null> value_;
};