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