diff --git a/server/src/tools/semantic_tokens.py b/server/src/tools/semantic_tokens.py index b2f762e..80d4197 100644 --- a/server/src/tools/semantic_tokens.py +++ b/server/src/tools/semantic_tokens.py @@ -172,7 +172,7 @@ class _Highlighter(Visitor): ) if routine.contents == "namespace" and command.args: first_arg = command.args[1] - if hasattr(first_arg, "pos") and hasattr(first_arg, "value"): + if hasattr(first_arg, "pos") and first_arg.value is not None: line, col = first_arg.pos self._tokens.append( (((line - 1, col - 1), len(first_arg.value), "class", []))