mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 02:39:05 +00:00
Fix mark refining
This commit is contained in:
1 parent
5a9a95e8da
commit
5820be3f40
1 file changed
+3
-4
+3
-4
@@ -101,8 +101,8 @@ public final class TreeSitterMarkBuilder {
|
||||
} catch (Exception e) {
|
||||
return marks;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
try {
|
||||
List<HighlightCapture> captures = ENGINE.highlights(tree, sourceText);
|
||||
@@ -147,8 +147,7 @@ public final class TreeSitterMarkBuilder {
|
||||
switch (group) {
|
||||
case FUNCTION:
|
||||
if ("identifier".equals(nodeType)) {
|
||||
// pattern 0 = method_declaration name → decl, pattern 1 = method_invocation name → call
|
||||
return capture.getPatternIndex() == 0 ? TokenType.METHOD_DECL : TokenType.METHOD_CALL;
|
||||
return TokenType.METHOD_CALL;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user