mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-05 22:48:42 +00:00
visitor abstract class added
This commit is contained in:
parent
8dcc3ce26f
commit
41330c5dee
3 changed files with 106 additions and 9 deletions
|
|
@ -26,7 +26,7 @@ using TypeclassIdentifier = std::string;
|
|||
|
||||
// Sources -----------------
|
||||
|
||||
struct SourceFile; // TODO partitions
|
||||
struct SourceFile;
|
||||
struct Sources;
|
||||
|
||||
// Namespaces, partittions -----------------
|
||||
|
|
@ -42,8 +42,8 @@ struct AliasDefinition;
|
|||
struct VariableDefinition;
|
||||
struct FunctionDeclaration;
|
||||
struct FunctionDefinition;
|
||||
struct AliasTypeDefinition; // | Parts of type definition
|
||||
struct TypeDefinition; // |
|
||||
struct AliasTypeDefinition;
|
||||
struct TypeDefinition;
|
||||
struct TypeclassDefinition;
|
||||
|
||||
using SourceStatement = std::variant<
|
||||
|
|
@ -81,7 +81,8 @@ struct DefinitionArgument;
|
|||
|
||||
struct Match;
|
||||
struct Condition;
|
||||
struct WhileLoop; // WhileLoop <-> DoWhileLoop
|
||||
struct DoWhileLoop;
|
||||
struct WhileLoop;
|
||||
struct ForLoop;
|
||||
struct LoopLoop;
|
||||
|
||||
|
|
@ -287,7 +288,7 @@ using ImportSymbol = std::variant<
|
|||
|
||||
struct ImportStatement : public Node {
|
||||
std::string module_name;
|
||||
std::vector<std::unique_ptr<ImportSymbol>> symbols; // TODO parametric import support
|
||||
std::vector<std::unique_ptr<ImportSymbol>> symbols;
|
||||
};
|
||||
|
||||
struct UsageDefinition : public Node {
|
||||
|
|
@ -385,7 +386,12 @@ struct Condition : public Node {
|
|||
std::vector<std::unique_ptr<Expression>> stetemets; // if, elif, else
|
||||
};
|
||||
|
||||
struct WhileLoop : public Node { // WhileLoop <-> DoWhileLoop
|
||||
struct DoWhileLoop : public Node {
|
||||
std::unique_ptr<Expression> consition;
|
||||
std::unique_ptr<Expression> statement;
|
||||
};
|
||||
|
||||
struct WhileLoop : public Node {
|
||||
std::unique_ptr<Expression> condition;
|
||||
std::unique_ptr<Expression> statement;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue