mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-20 05:48:44 +00:00
first iteration of find_symbols_visitor
This commit is contained in:
parent
87bd815bbb
commit
399631b9ca
13 changed files with 92065 additions and 92399 deletions
|
|
@ -56,7 +56,12 @@ using ImportSymbol = AnyIdentifier;
|
|||
|
||||
struct FunctionDefinition;
|
||||
struct TypeDefinition;
|
||||
struct DefinitionParameter;
|
||||
struct AnnotatedAbstractType;
|
||||
|
||||
// TypeIdentifier <-> AbstractTypeIdentifier <-> std::string
|
||||
using AnnotatedType = AnnotatedAbstractType;
|
||||
|
||||
using AnyAnnotatedType = AnnotatedType;
|
||||
|
||||
// Flow control -----------------
|
||||
|
||||
|
|
@ -168,8 +173,6 @@ using ScopedAnyName = AnyName;
|
|||
struct FunctionType;
|
||||
struct TupleType;
|
||||
struct VariantType;
|
||||
|
||||
struct AnnotatedType;
|
||||
struct ParametrizedType;
|
||||
struct TypeExpression;
|
||||
|
||||
|
|
@ -301,7 +304,7 @@ struct VariableDefinitionStatement {
|
|||
|
||||
struct FunctionDeclaration {
|
||||
NameOrOperatorIdentifier name;
|
||||
std::vector<std::unique_ptr<DefinitionParameter>> parameters;
|
||||
std::vector<std::unique_ptr<AnnotatedAbstractType>> parameters;
|
||||
std::unique_ptr<FunctionType> type;
|
||||
};
|
||||
|
||||
|
|
@ -332,16 +335,16 @@ struct TypeclassDefinitionStatement {
|
|||
struct FunctionDefinition {
|
||||
enum { Operator, Function } modifier;
|
||||
NameOrOperatorIdentifier name;
|
||||
std::vector<std::unique_ptr<DefinitionParameter>> parameters;
|
||||
std::vector<std::unique_ptr<AnnotatedAbstractType>> parameters;
|
||||
std::vector<ExtendedName> arguments;
|
||||
};
|
||||
|
||||
struct TypeDefinition {
|
||||
std::unique_ptr<AnnotatedType> type;
|
||||
std::vector<std::unique_ptr<DefinitionParameter>> parameters;
|
||||
std::vector<std::unique_ptr<AnnotatedAbstractType>> parameters;
|
||||
};
|
||||
|
||||
struct DefinitionParameter {
|
||||
struct AnnotatedAbstractType {
|
||||
AbstractTypeIdentifier type;
|
||||
std::vector<TypeclassUsage> typeclasses;
|
||||
};
|
||||
|
|
@ -444,7 +447,7 @@ struct TypeConstructor {
|
|||
};
|
||||
|
||||
struct LambdaFunction {
|
||||
std::vector<std::unique_ptr<DefinitionParameter>> parameters;
|
||||
std::vector<std::unique_ptr<AnnotatedAbstractType>> parameters;
|
||||
std::vector<ExtendedName> arguments;
|
||||
Expression expression;
|
||||
};
|
||||
|
|
@ -491,11 +494,6 @@ struct VariantType {
|
|||
std::vector<std::variant<Constructor, std::unique_ptr<TupleType>>> constructors;
|
||||
};
|
||||
|
||||
struct AnnotatedType {
|
||||
std::unique_ptr<TypeExpression> type_expression;
|
||||
std::vector<TypeclassUsage> annotations;
|
||||
};
|
||||
|
||||
struct ParametrizedType {
|
||||
std::unique_ptr<TypeExpression> type_expression;
|
||||
std::vector<TypeParameter> parameters;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue