0001 // 0002 // SyntaxKind.swift 0003 // SourceKitten 0004 // 0005 // Created by JP Simard on 2015-01-03. 0006 // Copyright (c) 2015 SourceKitten. All rights reserved. 0007 // 0008 0009 /// Syntax kind values. 0010 /// Found in `strings SourceKitService | grep source.lang.swift.syntaxtype.`. 0011 public enum SyntaxKind: String { 0012 /// `argument`. 0013 case Argument = "source.lang.swift.syntaxtype.argument" 0014 /// `attribute.builtin`. 0015 case AttributeBuiltin = "source.lang.swift.syntaxtype.attribute.builtin" 0016 /// `attribute.id`. 0017 case AttributeID = "source.lang.swift.syntaxtype.attribute.id" 0018 /// `buildconfig.id`. 0019 case BuildconfigID = "source.lang.swift.syntaxtype.buildconfig.id" 0020 /// `buildconfig.keyword`. 0021 case BuildconfigKeyword = "source.lang.swift.syntaxtype.buildconfig.keyword" 0022 /// `comment`. 0023 case Comment = "source.lang.swift.syntaxtype.comment" 0024 /// `comment.mark`. 0025 case CommentMark
File.swift:105 precondition(SwiftDocKey.getKind(dictionary)! == SyntaxKind.CommentMark.rawValue)File.swift:212 if kind == SyntaxKind.CommentMark.rawValue {File.swift:342 (kind == SyntaxKind.CommentMark.rawValue || SwiftDeclarationKind(rawValue: kind) != nil)Request.swift:149 SyntaxKind(rawValue: uidString)?.rawValueString+SourceKitten.swift:433 if token.type == SyntaxKind.Keyword.rawValue {String+SourceKitten.swift:438 return token.type == SyntaxKind.Identifier.rawValueSyntaxKind.swift:52 internal static func docComments() -> [SyntaxKind] {SyntaxKind.swift:53 return [CommentURL, DocComment, DocCommentField]SyntaxKind.swift:53 return [CommentURL, DocComment, DocCommentField]SyntaxKind.swift:53 return [CommentURL, DocComment, DocCommentField]SyntaxMap.swift:66 let docTypes = SyntaxKind.docComments().map({$0.rawValue})SyntaxToken.swift:31 self.type = SyntaxKind(rawValue: type)?.rawValue ?? type= "source.lang.swift.syntaxtype.comment.mark" 0026 /// `comment.url`. 0027 case CommentURL
File.swift:105 precondition(SwiftDocKey.getKind(dictionary)! == SyntaxKind.CommentMark.rawValue)File.swift:212 if kind == SyntaxKind.CommentMark.rawValue {File.swift:342 (kind == SyntaxKind.CommentMark.rawValue || SwiftDeclarationKind(rawValue: kind) != nil)= "source.lang.swift.syntaxtype.comment.url" 0028 /// `doccomment`. 0029 case DocComment
SyntaxKind.swift:53 return [CommentURL, DocComment, DocCommentField]= "source.lang.swift.syntaxtype.doccomment" 0030 /// `doccomment.field`. 0031 case DocCommentField
SyntaxKind.swift:53 return [CommentURL, DocComment, DocCommentField]= "source.lang.swift.syntaxtype.doccomment.field" 0032 /// `identifier`. 0033 case Identifier
SyntaxKind.swift:53 return [CommentURL, DocComment, DocCommentField]= "source.lang.swift.syntaxtype.identifier" 0034 /// `keyword`. 0035 case Keyword
String+SourceKitten.swift:438 return token.type == SyntaxKind.Identifier.rawValue= "source.lang.swift.syntaxtype.keyword" 0036 /// `number`. 0037 case Number = "source.lang.swift.syntaxtype.number" 0038 /// `objectliteral` 0039 case ObjectLiteral = "source.lang.swift.syntaxtype.objectliteral" 0040 /// `parameter`. 0041 case Parameter = "source.lang.swift.syntaxtype.parameter" 0042 /// `placeholder`. 0043 case Placeholder = "source.lang.swift.syntaxtype.placeholder" 0044 /// `string`. 0045 case String = "source.lang.swift.syntaxtype.string" 0046 /// `string_interpolation_anchor`. 0047 case StringInterpolationAnchor = "source.lang.swift.syntaxtype.string_interpolation_anchor" 0048 /// `typeidentifier`. 0049 case Typeidentifier = "source.lang.swift.syntaxtype.typeidentifier" 0050 0051 /// Returns the valid documentation comment syntax kinds. 0052 internal static func docComments
String+SourceKitten.swift:433 if token.type == SyntaxKind.Keyword.rawValue {() -> [SyntaxKind] { 0053 return [CommentURL, DocComment, DocCommentField] 0054 } 0055 } 0056
SyntaxMap.swift:66 let docTypes = SyntaxKind.docComments().map({$0.rawValue})