Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java64
1 files changed, 32 insertions, 32 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java
index b7e117a2b35..f2edfaf1f96 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java
@@ -65,23 +65,23 @@ public class KeywordSets {
return null;
}
- private static final Set<String> EMPTY_TABLE = new HashSet<String>(0);
+ private static final Set<String> EMPTY_TABLE = new HashSet<>(0);
private static final Set<String> NAMESPACE_ONLY_SET;
static {
- NAMESPACE_ONLY_SET = new HashSet<String>(1);
+ NAMESPACE_ONLY_SET = new HashSet<>(1);
NAMESPACE_ONLY_SET.add(Keywords.NAMESPACE);
}
private static final Set<String> MACRO_ONLY;
static {
- MACRO_ONLY = new HashSet<String>(1);
+ MACRO_ONLY = new HashSet<>(1);
MACRO_ONLY.add("defined()"); //$NON-NLS-1$
}
private static final Set<String> DECL_SPECIFIER_SEQUENCE_C;
static {
- DECL_SPECIFIER_SEQUENCE_C = new TreeSet<String>();
+ DECL_SPECIFIER_SEQUENCE_C = new TreeSet<>();
DECL_SPECIFIER_SEQUENCE_C.add(Keywords.INLINE);
DECL_SPECIFIER_SEQUENCE_C.add(Keywords.AUTO);
DECL_SPECIFIER_SEQUENCE_C.add(Keywords.REGISTER);
@@ -110,7 +110,7 @@ public class KeywordSets {
private static final Set<String> DECL_SPECIFIER_SEQUENCE_CPP;
static {
- DECL_SPECIFIER_SEQUENCE_CPP = new TreeSet<String>();
+ DECL_SPECIFIER_SEQUENCE_CPP = new TreeSet<>();
// add all of C then remove the ones we don't need
DECL_SPECIFIER_SEQUENCE_CPP.addAll(DECL_SPECIFIER_SEQUENCE_C);
DECL_SPECIFIER_SEQUENCE_CPP.remove(Keywords._COMPLEX);
@@ -132,14 +132,14 @@ public class KeywordSets {
private static final Map<ParserLanguage, Set<String>> DECL_SPECIFIER_SEQUENCE_TABLE;
static {
- DECL_SPECIFIER_SEQUENCE_TABLE = new HashMap<ParserLanguage, Set<String>>();
+ DECL_SPECIFIER_SEQUENCE_TABLE = new HashMap<>();
DECL_SPECIFIER_SEQUENCE_TABLE.put(ParserLanguage.CPP, DECL_SPECIFIER_SEQUENCE_CPP);
DECL_SPECIFIER_SEQUENCE_TABLE.put(ParserLanguage.C, DECL_SPECIFIER_SEQUENCE_C);
}
private static final Set<String> DECLARATION_CPP;
static {
- DECLARATION_CPP = new TreeSet<String>();
+ DECLARATION_CPP = new TreeSet<>();
DECLARATION_CPP.addAll(DECL_SPECIFIER_SEQUENCE_CPP);
DECLARATION_CPP.add(Keywords.ASM);
DECLARATION_CPP.add(Keywords.TEMPLATE);
@@ -151,21 +151,21 @@ public class KeywordSets {
private static final Set<String> DECLARATION_C;
static {
- DECLARATION_C = new TreeSet<String>();
+ DECLARATION_C = new TreeSet<>();
DECLARATION_C.addAll(DECL_SPECIFIER_SEQUENCE_C);
DECLARATION_C.add(Keywords.ASM);
}
private static final Map<ParserLanguage, Set<String>> DECLARATION_TABLE;
static {
- DECLARATION_TABLE = new HashMap<ParserLanguage, Set<String>>(2);
+ DECLARATION_TABLE = new HashMap<>(2);
DECLARATION_TABLE.put(ParserLanguage.CPP, DECLARATION_CPP);
DECLARATION_TABLE.put(ParserLanguage.C, DECLARATION_C);
}
private static final Set<String> EXPRESSION_C;
static {
- EXPRESSION_C = new TreeSet<String>();
+ EXPRESSION_C = new TreeSet<>();
EXPRESSION_C.add(Keywords.CHAR);
EXPRESSION_C.add(Keywords.SHORT);
EXPRESSION_C.add(Keywords.INT);
@@ -179,7 +179,7 @@ public class KeywordSets {
private static final Set<String> EXPRESSION_CPP;
static {
- EXPRESSION_CPP = new TreeSet<String>(EXPRESSION_C);
+ EXPRESSION_CPP = new TreeSet<>(EXPRESSION_C);
EXPRESSION_CPP.add(Keywords.BOOL);
EXPRESSION_CPP.add(Keywords.CHAR16_T);
EXPRESSION_CPP.add(Keywords.CHAR32_T);
@@ -202,14 +202,14 @@ public class KeywordSets {
private static final Map<ParserLanguage, Set<String>> EXPRESSION_TABLE;
static {
- EXPRESSION_TABLE = new HashMap<ParserLanguage, Set<String>>(2);
+ EXPRESSION_TABLE = new HashMap<>(2);
EXPRESSION_TABLE.put(ParserLanguage.CPP, EXPRESSION_CPP);
EXPRESSION_TABLE.put(ParserLanguage.C, EXPRESSION_C);
}
private static final Set<String> STATEMENT_C;
static {
- STATEMENT_C = new TreeSet<String>();
+ STATEMENT_C = new TreeSet<>();
STATEMENT_C.addAll(DECLARATION_C);
STATEMENT_C.addAll(EXPRESSION_C);
STATEMENT_C.add(Keywords.FOR);
@@ -228,7 +228,7 @@ public class KeywordSets {
private static final Set<String> STATEMENT_CPP;
static {
- STATEMENT_CPP = new TreeSet<String>(DECLARATION_CPP);
+ STATEMENT_CPP = new TreeSet<>(DECLARATION_CPP);
STATEMENT_CPP.addAll(EXPRESSION_CPP);
STATEMENT_CPP.add(Keywords.TRY);
STATEMENT_CPP.add(Keywords.FOR);
@@ -248,14 +248,14 @@ public class KeywordSets {
private static final Map<ParserLanguage, Set<String>> STATEMENT_TABLE;
static {
- STATEMENT_TABLE = new HashMap<ParserLanguage, Set<String>>();
+ STATEMENT_TABLE = new HashMap<>();
STATEMENT_TABLE.put(ParserLanguage.CPP, STATEMENT_CPP);
STATEMENT_TABLE.put(ParserLanguage.C, STATEMENT_C);
}
private static final Set<String> BASE_SPECIFIER_CPP;
static {
- BASE_SPECIFIER_CPP = new TreeSet<String>();
+ BASE_SPECIFIER_CPP = new TreeSet<>();
BASE_SPECIFIER_CPP.add(Keywords.PUBLIC);
BASE_SPECIFIER_CPP.add(Keywords.PROTECTED);
BASE_SPECIFIER_CPP.add(Keywords.PRIVATE);
@@ -264,7 +264,7 @@ public class KeywordSets {
private static final Set<String> CLASS_MEMBER;
static {
- CLASS_MEMBER = new TreeSet<String>(DECL_SPECIFIER_SEQUENCE_CPP);
+ CLASS_MEMBER = new TreeSet<>(DECL_SPECIFIER_SEQUENCE_CPP);
CLASS_MEMBER.add(Keywords.PUBLIC);
CLASS_MEMBER.add(Keywords.PROTECTED);
CLASS_MEMBER.add(Keywords.PRIVATE);
@@ -272,7 +272,7 @@ public class KeywordSets {
private static final Set<String> POST_USING_CPP;
static {
- POST_USING_CPP = new TreeSet<String>();
+ POST_USING_CPP = new TreeSet<>();
POST_USING_CPP.add(Keywords.NAMESPACE);
POST_USING_CPP.add(Keywords.TYPENAME);
}
@@ -281,7 +281,7 @@ public class KeywordSets {
private static final Set<String> FUNCTION_MODIFIER_CPP;
static {
- FUNCTION_MODIFIER_CPP = new TreeSet<String>(FUNCTION_MODIFIER_C);
+ FUNCTION_MODIFIER_CPP = new TreeSet<>(FUNCTION_MODIFIER_C);
FUNCTION_MODIFIER_CPP.add(Keywords.THROW);
FUNCTION_MODIFIER_CPP.add(Keywords.TRY);
@@ -290,14 +290,14 @@ public class KeywordSets {
private static final Map<ParserLanguage, Set<String>> FUNCTION_MODIFIER_TABLE;
static {
- FUNCTION_MODIFIER_TABLE = new HashMap<ParserLanguage, Set<String>>(2);
+ FUNCTION_MODIFIER_TABLE = new HashMap<>(2);
FUNCTION_MODIFIER_TABLE.put(ParserLanguage.CPP, FUNCTION_MODIFIER_CPP);
FUNCTION_MODIFIER_TABLE.put(ParserLanguage.C, FUNCTION_MODIFIER_C);
}
private static final Set<String> PP_DIRECTIVES_C;
static {
- PP_DIRECTIVES_C = new TreeSet<String>();
+ PP_DIRECTIVES_C = new TreeSet<>();
PP_DIRECTIVES_C.add(Directives.POUND_BLANK);
PP_DIRECTIVES_C.add(Directives.POUND_DEFINE);
PP_DIRECTIVES_C.add(Directives.POUND_UNDEF);
@@ -317,7 +317,7 @@ public class KeywordSets {
private static final Set<String> PP_DIRECTIVES_CPP;
static {
- PP_DIRECTIVES_CPP = new TreeSet<String>();
+ PP_DIRECTIVES_CPP = new TreeSet<>();
PP_DIRECTIVES_CPP.add(Directives.POUND_BLANK);
PP_DIRECTIVES_CPP.add(Directives.POUND_DEFINE);
PP_DIRECTIVES_CPP.add(Directives.POUND_UNDEF);
@@ -337,7 +337,7 @@ public class KeywordSets {
private static final Set<String> ALL_C;
static {
- ALL_C = new TreeSet<String>(PP_DIRECTIVES_CPP);
+ ALL_C = new TreeSet<>(PP_DIRECTIVES_CPP);
ALL_C.add(Keywords.AUTO);
ALL_C.add(Keywords.BREAK);
ALL_C.add(Keywords.CASE);
@@ -382,7 +382,7 @@ public class KeywordSets {
private static final Set<String> ALL_CPP;
static {
- ALL_CPP = new TreeSet<String>(PP_DIRECTIVES_CPP);
+ ALL_CPP = new TreeSet<>(PP_DIRECTIVES_CPP);
ALL_CPP.add(Keywords.ALIGNAS);
ALL_CPP.add(Keywords.ALIGNOF);
ALL_CPP.add(Keywords.AND);
@@ -471,14 +471,14 @@ public class KeywordSets {
private static final Map<ParserLanguage, Set<String>> ALL_TABLE;
static {
- ALL_TABLE = new HashMap<ParserLanguage, Set<String>>(2);
+ ALL_TABLE = new HashMap<>(2);
ALL_TABLE.put(ParserLanguage.C, ALL_C);
ALL_TABLE.put(ParserLanguage.CPP, ALL_CPP);
}
private static final Set<String> KEYWORDS_CPP;
static {
- KEYWORDS_CPP = new TreeSet<String>();
+ KEYWORDS_CPP = new TreeSet<>();
KEYWORDS_CPP.add(Keywords.ALIGNAS);
KEYWORDS_CPP.add(Keywords.ALIGNOF);
KEYWORDS_CPP.add(Keywords.AND);
@@ -568,7 +568,7 @@ public class KeywordSets {
private static Set<String> KEYWORDS_C;
static {
- KEYWORDS_C = new TreeSet<String>();
+ KEYWORDS_C = new TreeSet<>();
KEYWORDS_C.add(Keywords.ASM);
KEYWORDS_C.add(Keywords.AUTO);
KEYWORDS_C.add(Keywords.BREAK);
@@ -610,14 +610,14 @@ public class KeywordSets {
private static final Map<ParserLanguage, Set<String>> KEYWORDS_TABLE;
static {
- KEYWORDS_TABLE = new HashMap<ParserLanguage, Set<String>>(2);
+ KEYWORDS_TABLE = new HashMap<>(2);
KEYWORDS_TABLE.put(ParserLanguage.C, KEYWORDS_C);
KEYWORDS_TABLE.put(ParserLanguage.CPP, KEYWORDS_CPP);
}
private static final Set<String> TYPES_C;
static {
- TYPES_C = new TreeSet<String>();
+ TYPES_C = new TreeSet<>();
TYPES_C.add(Keywords.CHAR);
TYPES_C.add(Keywords.DOUBLE);
TYPES_C.add(Keywords.FLOAT);
@@ -634,7 +634,7 @@ public class KeywordSets {
private static final Set<String> TYPES_CPP;
static {
- TYPES_CPP = new TreeSet<String>();
+ TYPES_CPP = new TreeSet<>();
TYPES_CPP.add(Keywords.BOOL);
TYPES_CPP.add(Keywords.CHAR);
TYPES_CPP.add(Keywords.CHAR16_T);
@@ -652,14 +652,14 @@ public class KeywordSets {
private static Map<ParserLanguage, Set<String>> TYPES_TABLE;
static {
- TYPES_TABLE = new HashMap<ParserLanguage, Set<String>>(2);
+ TYPES_TABLE = new HashMap<>(2);
TYPES_TABLE.put(ParserLanguage.C, TYPES_C);
TYPES_TABLE.put(ParserLanguage.CPP, TYPES_CPP);
}
private static Map<ParserLanguage, Set<String>> PP_DIRECTIVES_TABLE;
static {
- PP_DIRECTIVES_TABLE = new HashMap<ParserLanguage, Set<String>>(2);
+ PP_DIRECTIVES_TABLE = new HashMap<>(2);
PP_DIRECTIVES_TABLE.put(ParserLanguage.C, PP_DIRECTIVES_C);
PP_DIRECTIVES_TABLE.put(ParserLanguage.CPP, PP_DIRECTIVES_CPP);
}

Back to the top