detect c-ism token better
This commit is contained in:
parent
12e1611754
commit
9f7de31dae
|
@ -90,7 +90,7 @@ class SkillLanguageServer(LanguageServer):
|
|||
for col, char in enumerate(line):
|
||||
if col > 0:
|
||||
if fullmatch("\\w", line[col - 1]) and char == "(":
|
||||
if m := re.match(r"\W+(\w+)$", line[:col]):
|
||||
if m := re.match(r"([a-zA-Z_][a-zA-Z_0-9]*)$", line[:col]):
|
||||
tok = m.group(1)
|
||||
else:
|
||||
tok = line[col - 1]
|
||||
|
|
Loading…
Reference in New Issue