print & build visitor fixed and tested

This commit is contained in:
ProgramSnail 2023-04-26 01:02:53 +03:00
parent c34523bd4f
commit 66a5dcfb4a
14 changed files with 91 additions and 62 deletions

View file

@ -94,12 +94,14 @@ struct FloatNumberLiteral;
struct NumberLiteral;
struct StringLiteral;
struct CharLiteral;
struct UnitLiteral;
using Literal = std::variant<
std::unique_ptr<FloatNumberLiteral>,
std::unique_ptr<NumberLiteral>,
std::unique_ptr<StringLiteral>,
std::unique_ptr<CharLiteral>>;
std::unique_ptr<CharLiteral>,
std::unique_ptr<UnitLiteral>>;
//
struct NameExpression;
@ -278,10 +280,7 @@ struct Partition {
enum PartitionName {
Test,
Interface,
Core,
Lib,
Module,
Exe,
Code,
};
PartitionName name;
@ -487,7 +486,7 @@ struct TypeConstructorParameter {
enum AssignmentModifier { Move, Assign };
std::optional<ExtendedName> name;
std::optional<AssignmentModifier> asignment_modifier;
PatternToken value;
SubExpression value;
};
struct TypeConstructor {
@ -599,4 +598,6 @@ struct CharLiteral {
char value;
};
struct UnitLiteral {};
} // namespace interpereter::tokens