mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-07 15:38:47 +00:00
grammar refactoring: part of build_visitor fixed
This commit is contained in:
parent
2d2bb9ec65
commit
64653e6a6a
6 changed files with 245 additions and 404 deletions
|
|
@ -215,7 +215,9 @@ using TypeSubExpression = std::variant<
|
|||
// Comments [IGNORE] -----------------
|
||||
// Identifiers, constants, etc. -----------------
|
||||
|
||||
using ExtendedName = std::string;
|
||||
struct ExtendedName {
|
||||
std::string name;
|
||||
};
|
||||
|
||||
struct FloatNumberLiteral;
|
||||
struct NumberLiteral;
|
||||
|
|
@ -255,7 +257,8 @@ struct Sources {
|
|||
// ----------------- Namespaces, partittions -----------------
|
||||
|
||||
struct Namespace {
|
||||
enum { Const, Var } modifier;
|
||||
enum Modifier { Const, Var };
|
||||
std::optional<Modifier> modifier;
|
||||
std::optional<ExtendedName> name;
|
||||
TypeIdentifier type;
|
||||
std::unique_ptr<Sources> scope;
|
||||
|
|
@ -315,7 +318,7 @@ struct TypeDefinitionStatement {
|
|||
|
||||
struct AbstractTypeDefinitionStatement {
|
||||
enum { Basic, Abstract } modifier;
|
||||
std::unique_ptr<AnnotatedType> definition;
|
||||
std::unique_ptr<AnnotatedType> type;
|
||||
};
|
||||
|
||||
struct TypeclassDefinitionStatement {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue