IDEADEV-41999: '​true​'​/​'​false' map keys generate analysis errors "​Property Selec...
authorMaxim Medvedev <maxim.medvedev@jetbrains.com>
Sat, 19 Dec 2009 17:50:20 +0000 (20:50 +0300)
committerMaxim Medvedev <maxim.medvedev@jetbrains.com>
Sat, 19 Dec 2009 17:50:20 +0000 (20:50 +0300)
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/lexer/TokenSets.java

index f91b4f8755261cb4afdd7d74210381186f71e6ac..a94b827e8cc3ada60685f5635e7e11ff96e01db0 100644 (file)
@@ -85,22 +85,14 @@ public abstract class TokenSets implements GroovyTokenTypes {
       kDOUBLE
   );
 
-  public static TokenSet KEYWORD_REFERENCE_NAMES = TokenSet.orSet(TokenSet.create(
-      kCLASS,
-      kIN,
-      kAS,
-      kDEF,
-      kIF,
-      kELSE,
-      kFOR,
-      kWHILE,
-      kSWITCH,
-      kTRY,
-      kCATCH,
-      kFINALLY,
-      kSTATIC,
-      kDEFAULT
-  ), BUILT_IN_TYPE);
+  /**
+   * all keywords except 'this' and 'super'
+   */
+  public static TokenSet KEYWORD_REFERENCE_NAMES = TokenSet
+    .create(kPACKAGE, kIMPORT, kSTATIC, kDEF, kCLASS, kINTERFACE, kENUM, kEXTENDS, kSUPER, kVOID, kBOOLEAN, kBYTE, kCHAR, kSHORT, kINT,
+            kFLOAT, kLONG, kDOUBLE, kAS, kPRIVATE, kPUBLIC, kPROTECTED, kTRANSIENT, kNATIVE, kSYNCHRONIZED, kVOLATILE, kDEFAULT, kTHROWS,
+            kIMPLEMENTS, kIF, kELSE, kWHILE, kSWITCH, kFOR, kIN, kRETURN, kBREAK, kCONTINUE, kTHROW, kASSERT, kCASE, kTRY, kFINALLY, kCATCH,
+            kINSTANCEOF, kNEW, kTRUE, kNULL);
 
   public static final TokenSet PROPERTY_NAMES = TokenSet.create(mIDENT, mSTRING_LITERAL, mGSTRING_LITERAL);