@@ -18,19 +18,12 @@ public class TokenSpec {
1818  public  let  unprefixedKind :  String 
1919  public  let  text :  String ? 
2020  public  let  classification :  SyntaxClassification ? 
21-   public  let  isKeyword :  Bool 
2221  public  let  requiresLeadingSpace :  Bool 
2322  public  let  requiresTrailingSpace :  Bool 
2423  public  let  associatedValueClass :  String ? 
2524
2625  public  var  swiftKind :  String  { 
27-     let  name  =  lowercaseFirstWord ( name:  self . name) 
28- 
29-     if  isKeyword { 
30-       return  name +  " Keyword " 
31-     }  else  { 
32-       return  name
33-     } 
26+     return  lowercaseFirstWord ( name:  self . name) 
3427  } 
3528
3629  init ( 
@@ -40,7 +33,6 @@ public class TokenSpec {
4033    unprefixedKind:  String ? =  nil , 
4134    text:  String ? =  nil , 
4235    classification:  String  =  " None " , 
43-     isKeyword:  Bool  =  false , 
4436    requiresLeadingSpace:  Bool  =  false , 
4537    requiresTrailingSpace:  Bool  =  false , 
4638    associatedValueClass:  String ? =  nil 
@@ -55,20 +47,19 @@ public class TokenSpec {
5547    } 
5648    self . text =  text
5749    self . classification =  classificationByName ( classification) 
58-     self . isKeyword =  isKeyword
5950    self . requiresLeadingSpace =  requiresLeadingSpace
6051    self . requiresTrailingSpace =  requiresTrailingSpace
6152    self . associatedValueClass =  associatedValueClass
6253  } 
6354} 
6455
65- public  class  PoundKeywordSpec :  TokenSpec  { 
56+ public  class  PoundSpec :  TokenSpec  { 
6657  init ( 
6758    name:  String , 
6859    kind:  String , 
6960    nameForDiagnostics:  String ? =  nil , 
7061    text:  String , 
71-     classification:  String  =  " Keyword " 
62+     classification:  String  =  " None " 
7263  )  { 
7364    super. init ( 
7465      name:  name, 
@@ -77,13 +68,12 @@ public class PoundKeywordSpec: TokenSpec {
7768      unprefixedKind:  kind, 
7869      text:  text, 
7970      classification:  classification, 
80-       isKeyword:  true , 
8171      requiresTrailingSpace:  true 
8272    ) 
8373  } 
8474} 
8575
86- public  class  PoundObjectLiteralSpec :  PoundKeywordSpec  { 
76+ public  class  PoundObjectLiteralSpec :  PoundSpec  { 
8777  let  `protocol` :  String 
8878
8979  init ( 
@@ -105,14 +95,14 @@ public class PoundObjectLiteralSpec: PoundKeywordSpec {
10595  } 
10696} 
10797
108- public  class  PoundConfigSpec :  PoundKeywordSpec  { } 
98+ public  class  PoundConfigSpec :  PoundSpec  { } 
10999
110- public  class  PoundDirectiveKeywordSpec :   PoundKeywordSpec  { 
100+ public  class  PoundDirectiveSpec :   PoundSpec  { 
111101  init ( 
112102    name:  String , 
113103    kind:  String , 
114104    text:  String , 
115-     classification:  String  =  " PoundDirectiveKeyword " 
105+     classification:  String  =  " PoundDirective " 
116106  )  { 
117107    super. init ( 
118108      name:  name, 
@@ -123,12 +113,12 @@ public class PoundDirectiveKeywordSpec: PoundKeywordSpec {
123113  } 
124114} 
125115
126- public  class  PoundConditionalDirectiveKeywordSpec :   PoundDirectiveKeywordSpec  { 
116+ public  class  PoundConditionalDirectiveSpec :   PoundDirectiveSpec  { 
127117  override init ( 
128118    name:  String , 
129119    kind:  String , 
130120    text:  String , 
131-     classification:  String  =  " PoundDirectiveKeyword " 
121+     classification:  String  =  " PoundDirective " 
132122  )  { 
133123    super. init ( 
134124      name:  name, 
@@ -155,7 +145,6 @@ public class PunctuatorSpec: TokenSpec {
155145      unprefixedKind:  nil , 
156146      text:  text, 
157147      classification:  classification, 
158-       isKeyword:  false , 
159148      requiresLeadingSpace:  requiresLeadingSpace, 
160149      requiresTrailingSpace:  requiresTrailingSpace
161150    ) 
@@ -202,11 +191,11 @@ public let SYNTAX_TOKENS: [TokenSpec] = [
202191  PunctuatorSpec ( name:  " PostfixQuestionMark " ,  kind:  " question_postfix " ,  text:  " ? " ) , 
203192  PunctuatorSpec ( name:  " Pound " ,  kind:  " pound " ,  text:  " # " ) , 
204193  PoundConfigSpec ( name:  " PoundAvailable " ,  kind:  " pound_available " ,  text:  " #available " ) , 
205-   PoundConditionalDirectiveKeywordSpec ( name:  " PoundElse " ,  kind:  " pound_else " ,  text:  " #else " ) , 
206-   PoundConditionalDirectiveKeywordSpec ( name:  " PoundElseif " ,  kind:  " pound_elseif " ,  text:  " #elseif " ) , 
207-   PoundConditionalDirectiveKeywordSpec ( name:  " PoundEndif " ,  kind:  " pound_endif " ,  text:  " #endif " ) , 
208-   PoundConditionalDirectiveKeywordSpec ( name:  " PoundIf " ,  kind:  " pound_if " ,  text:  " #if " ) , 
209-   PoundDirectiveKeywordSpec ( name:  " PoundSourceLocation " ,  kind:  " pound_sourceLocation " ,  text:  " #sourceLocation " ) , 
194+   PoundConditionalDirectiveSpec ( name:  " PoundElse " ,  kind:  " pound_else " ,  text:  " #else " ) , 
195+   PoundConditionalDirectiveSpec ( name:  " PoundElseif " ,  kind:  " pound_elseif " ,  text:  " #elseif " ) , 
196+   PoundConditionalDirectiveSpec ( name:  " PoundEndif " ,  kind:  " pound_endif " ,  text:  " #endif " ) , 
197+   PoundConditionalDirectiveSpec ( name:  " PoundIf " ,  kind:  " pound_if " ,  text:  " #if " ) , 
198+   PoundDirectiveSpec ( name:  " PoundSourceLocation " ,  kind:  " pound_sourceLocation " ,  text:  " #sourceLocation " ) , 
210199  PoundConfigSpec ( name:  " PoundUnavailable " ,  kind:  " pound_unavailable " ,  text:  " #unavailable " ) , 
211200  PunctuatorSpec ( name:  " PrefixAmpersand " ,  kind:  " amp_prefix " ,  text:  " & " ) , 
212201  MiscSpec ( name:  " PrefixOperator " ,  kind:  " oper_prefix " ,  nameForDiagnostics:  " prefix operator " ,  classification:  " OperatorIdentifier " ) , 
0 commit comments