Highlighter - AS3 arguments variable, fixed dotted identifiers

This commit is contained in:
Jindra Petřík
2025-05-31 10:23:44 +02:00
parent df9791ebda
commit 458214106b
3 changed files with 11 additions and 8 deletions
@@ -188,7 +188,7 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC
&& (token.start == pos)) {
return token;
}
return null;
return getNearestTokenAt(sDoc, pos);
}
private Token getNearestTokenAt(SyntaxDocument sDoc, int pos) {
@@ -261,7 +261,9 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC
markerKind = underLineMarkOccurencesPainter;
}
}
Markers.markToken(pane, definitionToken, markerKind);
if (tokenTypes.contains(definitionToken.type)) {
Markers.markToken(pane, definitionToken, markerKind);
}
occurencesPositions.add(definitionToken.start);
for (int i : definitionPosToReferences.get(definitionPos)) {
Token referenceToken = getIdentifierTokenAt(sDoc, i);