Skip to content

Commit 7605bfa

Browse files
committed
do not analyse VARIABLE tokens
1 parent a8f3bbc commit 7605bfa

File tree

1 file changed

+5
-1
lines changed
  • robotcode/language_server/robotframework/diagnostics

1 file changed

+5
-1
lines changed

robotcode/language_server/robotframework/diagnostics/analyzer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ async def visit(self, node: ast.AST) -> None:
6161
self.node_stack.append(node)
6262
try:
6363
if isinstance(node, HasTokens):
64-
for token in (t for t in node.tokens if contains_variable(t.value, "$@&%")):
64+
for token in (
65+
t
66+
for t in node.tokens
67+
if t.type != RobotToken.VARIABLE and t.error is None and contains_variable(t.value, "$@&%")
68+
):
6569
async for var_token, var in self.iter_variables_from_token(
6670
token,
6771
self.namespace,

0 commit comments

Comments
 (0)