mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
bool literals, fixes
This commit is contained in:
parent
b1aff1935d
commit
d31979166e
24 changed files with 179 additions and 46 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue