Sort NodeKind members in different categories

This commit is contained in:
Sam Vervaeck 2024-07-10 16:15:16 +02:00
parent 2a257275e8
commit 560c689fc7
Signed by: samvv
SSH key fingerprint: SHA256:dIg0ywU1OP+ZYifrYxy8c5esO72cIKB+4/9wkZj1VaY

View file

@ -88,104 +88,134 @@ public:
};
enum class NodeKind {
VBar,
Equals,
// Plain tokens
Assignment,
At,
Colon,
Comma,
CustomOperator,
DoKeyword,
Dot,
DotDot,
Tilde,
At,
DoKeyword,
LParen,
RParen,
LBracket,
RBracket,
Equals,
Identifier,
IdentifierAlt,
LBrace,
RBrace,
LBracket,
LParen,
RArrow,
RArrowAlt,
RBrace,
RBracket,
RParen,
Tilde,
VBar,
WrappedOperator,
// Keywords
ClassKeyword,
ElifKeyword,
ElseKeyword,
EnumKeyword,
ForeignKeyword,
IfKeyword,
InstanceKeyword,
LetKeyword,
MatchKeyword,
ModKeyword,
MutKeyword,
PubKeyword,
ForeignKeyword,
TypeKeyword,
ReturnKeyword,
ModKeyword,
StructKeyword,
EnumKeyword,
ClassKeyword,
InstanceKeyword,
ElifKeyword,
IfKeyword,
ElseKeyword,
MatchKeyword,
Invalid,
EndOfFile,
TypeKeyword,
// Virtual tokens
BlockStart,
BlockEnd,
LineFoldEnd,
CustomOperator,
Assignment,
EndOfFile,
Invalid,
// Literal tokens
StringLiteral,
IntegerLiteral,
Identifier,
IdentifierAlt,
WrappedOperator,
// Annotations
ExpressionAnnotation,
TypeAssertAnnotation,
// Constraint expressions
TypeclassConstraintExpression,
EqualityConstraintExpression,
RecordTypeExpressionField,
RecordTypeExpression,
QualifiedTypeExpression,
ReferenceTypeExpression,
ArrowTypeExpression,
// Type expressions
AppTypeExpression,
VarTypeExpression,
ArrowTypeExpression,
NestedTypeExpression,
QualifiedTypeExpression,
RecordTypeExpressionField,
ReferenceTypeExpression,
TupleTypeExpression,
BindPattern,
LiteralPattern,
VarTypeExpression,
RecordPatternField,
RecordPattern,
// Patterns
BindPattern,
ListPattern,
LiteralPattern,
NamedRecordPattern,
NamedTuplePattern,
TuplePattern,
NestedPattern,
ListPattern,
ReferenceExpression,
RecordPattern,
TuplePattern,
MatchCase,
MatchExpression,
BlockExpression,
MemberExpression,
TupleExpression,
NestedExpression,
LiteralExpression,
CallExpression,
InfixExpression,
PrefixExpression,
RecordExpressionField,
RecordExpression,
ReturnExpression,
IfExpression,
IfExpressionPart,
// Expressions
BlockExpression,
CallExpression,
IfExpression,
InfixExpression,
LiteralExpression,
MatchExpression,
MemberExpression,
NestedExpression,
PrefixExpression,
RecordExpression,
ReferenceExpression,
ReturnExpression,
TupleExpression,
TypeAssert,
Parameter,
// Bodies of a let-declaration or function declaration
LetBlockBody,
LetExprBody,
// Function declarations
PrefixFunctionDeclaration,
InfixFunctionDeclaration,
SuffixFunctionDeclaration,
NamedFunctionDeclaration,
VariableDeclaration,
RecordDeclarationField,
RecordDeclaration,
VariantDeclaration,
TupleVariantDeclarationMember,
RecordVariantDeclarationMember,
// Other declarations
ClassDeclaration,
InstanceDeclaration,
RecordDeclaration,
VariableDeclaration,
VariantDeclaration,
SourceFile,
};