(ANGLE, "angle"),
(ARITHMETIC, "arithmetic"),
(ATTRIBUTE, "attribute"),
+ (ATTRIBUTE_BRACKET, "attributeBracket"),
(BITWISE, "bitwise"),
(BOOLEAN, "boolean"),
(BRACE, "brace"),
(BRACKET, "bracket"),
+ (BUILTIN_ATTRIBUTE, "builtinAttribute"),
(BUILTIN_TYPE, "builtinType"),
- (CHAR_LITERAL, "characterLiteral"),
+ (CHAR, "character"),
(COLON, "colon"),
(COMMA, "comma"),
(COMPARISON, "comparison"),
(CONST_PARAMETER, "constParameter"),
+ (DERIVE, "derive"),
(DOT, "dot"),
(ESCAPE_SEQUENCE, "escapeSequence"),
(FORMAT_SPECIFIER, "formatSpecifier"),
(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"),
];
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"),
+ (INTRA_DOC_LINK, "intraDocLink"),
+ (LIBRARY, "library"),
(MUTABLE, "mutable"),
- (CONSUMING, "consuming"),
- (ASYNC, "async"),
- (UNSAFE, "unsafe"),
- (ATTRIBUTE_MODIFIER, "attribute"),
+ (PUBLIC, "public"),
+ (REFERENCE, "reference"),
(TRAIT_MODIFIER, "trait"),
- (CALLABLE, "callable"),
- (INTRA_DOC_LINK, "intraDocLink"),
+ (UNSAFE, "unsafe"),
];
#[derive(Default)]
/// Tokens are encoded relative to each other.
///
-/// This is a direct port of https://github.com/microsoft/vscode-languageserver-node/blob/f425af9de46a0187adb78ec8a46b9b2ce80c5412/server/src/sematicTokens.proposed.ts#L45
+/// This is a direct port of <https://github.com/microsoft/vscode-languageserver-node/blob/f425af9de46a0187adb78ec8a46b9b2ce80c5412/server/src/sematicTokens.proposed.ts#L45>
pub(crate) struct SemanticTokensBuilder {
id: String,
prev_line: u32,