File tree Expand file tree Collapse file tree 2 files changed +12
-18
lines changed
robotcode/language_server/robotframework Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -841,14 +841,6 @@ async def get_variable_matchers(
841841
842842 return {m : v async for m , v in self .yield_variables (nodes , position )}
843843
844- _match_extended = re .compile (
845- r"""
846- (.+?) # base name (group 1)
847- ([^\s\w].+) # extended part (group 2)
848- """ ,
849- re .UNICODE | re .VERBOSE ,
850- )
851-
852844 @_logger .call
853845 async def find_variable (
854846 self ,
Original file line number Diff line number Diff line change @@ -440,16 +440,18 @@ async def iter_token(
440440 if is_number (name ):
441441 continue
442442 elif return_not_found :
443- yield strip_variable_token (sub_sub_token ), VariableNotFoundDefinition (
444- sub_sub_token .lineno ,
445- sub_sub_token .col_offset ,
446- sub_sub_token .lineno ,
447- sub_sub_token .end_col_offset ,
448- namespace .source ,
449- name ,
450- sub_sub_token ,
451- )
452- continue
443+ if contains_variable (sub_token .value [2 :- 1 ]):
444+ continue
445+ else :
446+ yield strip_variable_token (sub_sub_token ), VariableNotFoundDefinition (
447+ sub_sub_token .lineno ,
448+ sub_sub_token .col_offset ,
449+ sub_sub_token .lineno ,
450+ sub_sub_token .end_col_offset ,
451+ namespace .source ,
452+ name ,
453+ sub_sub_token ,
454+ )
453455 if return_not_found :
454456 yield strip_variable_token (sub_token ), VariableNotFoundDefinition (
455457 sub_token .lineno ,
You can’t perform that action at this time.
0 commit comments