mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Made AssignmentInfo LHS start from statementStart, modifiers and type inclusive
This commit is contained in:
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 ====================
|
||||
|
||||
+2
-5
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user