Lsp hotfix

This commit is contained in:
Cameron Dehning 2023-03-24 16:27:22 +00:00 committed by James Westman
parent bc605c5df8
commit 7e20983b44
2 changed files with 3 additions and 2 deletions

View file

@ -297,7 +297,8 @@ class IdentLiteral(AstNode):
return None
def get_semantic_tokens(self) -> T.Iterator[SemanticToken]:
if isinstance(self.parent.value_type, gir.Enumeration):
type = self.context[ValueTypeCtx].value_type
if isinstance(type, gir.Enumeration):
token = self.group.tokens["value"]
yield SemanticToken(token.start, token.end, SemanticTokenType.EnumMember)