Merge pull request #19045 from ChayimFriedman2/missing-token

fix: Fix a missing standard token in semantic highlighting
This commit is contained in:
Lukas Wirth 2025-01-27 13:23:42 +00:00 committed by GitHub
commit 238d7bd1e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,7 @@ macro_rules! define_semantic_token_types {
}
pub(crate) const SUPPORTED_TYPES: &[SemanticTokenType] = &[
$(SemanticTokenType::$standard,)*
$(self::types::$standard,)*
$(self::types::$custom),*
];
@ -32,7 +32,7 @@ macro_rules! define_semantic_token_types {
use self::types::*;
$(
if token == $custom {
None $(.or(Some(SemanticTokenType::$fallback)))?
None $(.or(Some(self::types::$fallback)))?
} else
)*
{ Some(token )}
@ -60,6 +60,7 @@ define_semantic_token_types![
STRUCT,
TYPE_PARAMETER,
VARIABLE,
TYPE,
}
custom {