]> git.lizzy.rs Git - rust.git/blobdiff - crates/rust-analyzer/src/semantic_tokens.rs
Replaced fold with for loop
[rust.git] / crates / rust-analyzer / src / semantic_tokens.rs
index f2ed98f2a4b3e64d392941ef2523480b4ebbed5c..c6322327a5ee5c5fade32cf508e2136336051398 100644 (file)
@@ -41,6 +41,7 @@ macro_rules! define_semantic_token_types {
     (ANGLE, "angle"),
     (ARITHMETIC, "arithmetic"),
     (ATTRIBUTE, "attribute"),
+    (ATTRIBUTE_BRACKET, "attributeBracket"),
     (BITWISE, "bitwise"),
     (BOOLEAN, "boolean"),
     (BRACE, "brace"),
@@ -52,6 +53,7 @@ macro_rules! define_semantic_token_types {
     (COMMA, "comma"),
     (COMPARISON, "comparison"),
     (CONST_PARAMETER, "constParameter"),
+    (DERIVE, "derive"),
     (DOT, "dot"),
     (ESCAPE_SEQUENCE, "escapeSequence"),
     (FORMAT_SPECIFIER, "formatSpecifier"),
@@ -59,12 +61,14 @@ macro_rules! define_semantic_token_types {
     (LABEL, "label"),
     (LIFETIME, "lifetime"),
     (LOGICAL, "logical"),
+    (MACRO_BANG, "macroBang"),
     (OPERATOR, "operator"),
     (PARENTHESIS, "parenthesis"),
     (PUNCTUATION, "punctuation"),
     (SELF_KEYWORD, "selfKeyword"),
     (SEMICOLON, "semicolon"),
     (TYPE_ALIAS, "typeAlias"),
+    (TOOL_MODULE, "toolModule"),
     (UNION, "union"),
     (UNRESOLVED_REFERENCE, "unresolvedReference"),
 ];
@@ -81,26 +85,28 @@ macro_rules! define_semantic_token_modifiers {
             SemanticTokenModifier::ABSTRACT,
             SemanticTokenModifier::DEPRECATED,
             SemanticTokenModifier::READONLY,
+            SemanticTokenModifier::DEFAULT_LIBRARY,
             $($ident),*
         ];
     };
 }
 
 define_semantic_token_modifiers![
+    (ASYNC, "async"),
+    (ATTRIBUTE_MODIFIER, "attribute"),
+    (CALLABLE, "callable"),
     (CONSTANT, "constant"),
+    (CONSUMING, "consuming"),
     (CONTROL_FLOW, "controlFlow"),
+    (CRATE_ROOT, "crateRoot"),
     (INJECTED, "injected"),
-    (MUTABLE, "mutable"),
-    (CONSUMING, "consuming"),
-    (ASYNC, "async"),
+    (INTRA_DOC_LINK, "intraDocLink"),
     (LIBRARY, "library"),
+    (MUTABLE, "mutable"),
     (PUBLIC, "public"),
-    (UNSAFE, "unsafe"),
-    (ATTRIBUTE_MODIFIER, "attribute"),
-    (TRAIT_MODIFIER, "trait"),
-    (CALLABLE, "callable"),
-    (INTRA_DOC_LINK, "intraDocLink"),
     (REFERENCE, "reference"),
+    (TRAIT_MODIFIER, "trait"),
+    (UNSAFE, "unsafe"),
 ];
 
 #[derive(Default)]