mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-06 23:18:45 +00:00
basic printers, type printers, some fixes, part of expression printers
This commit is contained in:
parent
3914ff7d8b
commit
3669084f55
14 changed files with 795 additions and 39 deletions
|
|
@ -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_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue