mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
apart of build_visitor done
This commit is contained in:
parent
36eb3390aa
commit
622b86f6c6
8 changed files with 987 additions and 312 deletions
|
|
@ -313,7 +313,7 @@ struct VariableDefinition : public Node {
|
|||
};
|
||||
|
||||
struct FunctionDeclaration : public Node {
|
||||
NameIdentifier name;
|
||||
NameOrOperatorIdentifier name;
|
||||
std::vector<std::unique_ptr<DefinitionParameter>> parameters;
|
||||
std::vector<FunctionDeclarationType> argument_types;
|
||||
};
|
||||
|
|
@ -324,17 +324,18 @@ struct FunctionDefinition : public Node {
|
|||
};
|
||||
|
||||
struct AliasTypeDefinition : public Node {
|
||||
std::unique_ptr<DefinedType> name;
|
||||
std::unique_ptr<DefinedType> type;
|
||||
std::unique_ptr<ParametrizedType> value;
|
||||
};
|
||||
|
||||
struct TypeDefinition : public Node {
|
||||
std::unique_ptr<DefinedType> name;
|
||||
bool is_class; // class vs struct
|
||||
std::unique_ptr<DefinedType> type;
|
||||
AnyType value;
|
||||
};
|
||||
|
||||
struct TypeclassDefinition : public Node {
|
||||
std::unique_ptr<DefinedTypeclass> name;
|
||||
std::unique_ptr<DefinedTypeclass> typeclass;
|
||||
std::vector<std::unique_ptr<FunctionDeclaration>> requirements;
|
||||
};
|
||||
|
||||
|
|
@ -497,7 +498,7 @@ struct VariantName : public Node {
|
|||
|
||||
struct AnnotatedName : public Node {
|
||||
NameIdentifier name;
|
||||
std::unique_ptr<ParametrizedType> type; // optional
|
||||
std::optional<std::unique_ptr<ParametrizedType>> type; // optional
|
||||
};
|
||||
|
||||
// TODO ?? mark all optional fields ??
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue