Made AssignmentInfo LHS start from statementStart, modifiers and type inclusive

This commit is contained in:
bigguy345 committed 2025-12-27 18:54:56 +02:00
1 parent 40d35d2f20
commit bacbc877bd
2 files changed
+4 -7

No files matched your search

@@ -238,7 +238,7 @@ public class AssignmentInfo {
* Check if the given global position falls within the LHS (target) of this assignment.
*/
public boolean containsLhsPosition(int position) {
return position >= lhsStart && position < lhsEnd;
return position >= statementStart && position < lhsEnd;
}
/**
@@ -252,7 +252,7 @@ public class AssignmentInfo {
* Check if the given global position falls anywhere in this assignment (LHS or RHS).
*/
public boolean containsPosition(int position) {
return position >= lhsStart && position <= rhsEnd;
return position >= statementStart && position <= rhsEnd;
}
// ==================== ERROR TYPE CHECKS ====================
@@ -127,16 +127,13 @@ public class TokenHoverInfo {
break;
case LITERAL:
if (info.hasErrors())
return info;
return null;
case KEYWORD:
case MODIFIER:
case STRING:
case COMMENT:
// These don't need hover info typically
if (info.hasErrors())
return info;
return null;
default:
// For other types, try to extract any available metadata
if (token.getTypeInfo() != null) {