File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
robotcode/language_server/robotframework/diagnostics Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ async def visit(self, node: ast.AST) -> None:
149
149
KeywordCall ,
150
150
Template ,
151
151
TestTemplate ,
152
+ Variable ,
152
153
)
153
154
from robot .variables .search import contains_variable
154
155
@@ -167,7 +168,9 @@ async def visit(self, node: ast.AST) -> None:
167
168
for token1 in (
168
169
t
169
170
for t in node .tokens
170
- if t .type != RobotToken .VARIABLE and t .error is None and contains_variable (t .value , "$@&%" )
171
+ if not (isinstance (node , Variable ) and t .type == RobotToken .VARIABLE )
172
+ and t .error is None
173
+ and contains_variable (t .value , "$@&%" )
171
174
):
172
175
async for token in self .yield_argument_name_and_rest (node , token1 ):
173
176
if isinstance (node , Arguments ) and token .value == "@{}" :
@@ -199,6 +202,7 @@ async def visit(self, node: ast.AST) -> None:
199
202
elif var not in self ._variable_references and token1 .type in [
200
203
RobotToken .ASSIGN ,
201
204
RobotToken .ARGUMENT ,
205
+ RobotToken .VARIABLE ,
202
206
]:
203
207
self ._variable_references [var ] = set ()
204
208
You can’t perform that action at this time.
0 commit comments