mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Lsp hotfix
This commit is contained in:
parent
bc605c5df8
commit
7e20983b44
2 changed files with 3 additions and 2 deletions
|
@ -297,7 +297,8 @@ class IdentLiteral(AstNode):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_semantic_tokens(self) -> T.Iterator[SemanticToken]:
|
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"]
|
token = self.group.tokens["value"]
|
||||||
yield SemanticToken(token.start, token.end, SemanticTokenType.EnumMember)
|
yield SemanticToken(token.start, token.end, SemanticTokenType.EnumMember)
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ def _tokenize(ui_ml: str):
|
||||||
i = 0
|
i = 0
|
||||||
while i < len(ui_ml):
|
while i < len(ui_ml):
|
||||||
matched = False
|
matched = False
|
||||||
for (type, regex) in _TOKENS:
|
for type, regex in _TOKENS:
|
||||||
match = regex.match(ui_ml, i)
|
match = regex.match(ui_ml, i)
|
||||||
|
|
||||||
if match is not None:
|
if match is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue