bool literals, fixes

This commit is contained in:
ProgramSnail 2023-05-08 20:34:36 +03:00
parent b1aff1935d
commit d31979166e
24 changed files with 179 additions and 46 deletions

View file

@ -108,13 +108,15 @@ struct NumberLiteral;
struct StringLiteral;
struct CharLiteral;
struct UnitLiteral;
struct BoolLiteral;
using Literal = std::variant<
std::unique_ptr<FloatNumberLiteral>,
std::unique_ptr<NumberLiteral>,
std::unique_ptr<StringLiteral>,
std::unique_ptr<CharLiteral>,
std::unique_ptr<UnitLiteral>>;
std::unique_ptr<UnitLiteral>,
std::unique_ptr<BoolLiteral>>;
//
struct NameExpression;
@ -703,4 +705,10 @@ struct UnitLiteral {
BaseNode base;
};
struct BoolLiteral {
BaseNode base;
bool value;
};
} // namespace interpereter::tokens