public override void VisitEnumDeclaration(EnumDeclarationSyntax node) { var defineName = node.ChildTokens().FirstOrDefault(x => x.Kind() == SyntaxKind.IdentifierToken).ToString(); var enumMembers = node.ChildNodes().OfType <EnumMemberDeclarationSyntax>().Select(x => x.Identifier.Text); var startLength = node.Span.Start; var endLength = node.Span.End; var parentNamespace = GetNamespace(DefineKinds.Enum, startLength, endLength); UserDefinitions.Add(new UserDefinition { DefineKinds = DefineKinds.Enum, Namespace = parentNamespace, DefineName = defineName, DefineFullName = $"{parentNamespace}.{defineName}", EnumMembers = enumMembers.ToList(), SourceFile = SourceFile, StartLength = startLength, EndLength = endLength, });; base.VisitEnumDeclaration(node); }