mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 03:07:34 +00:00
Removed redundant
This commit is contained in:
1 parent
455f09ac68
commit
d645ecc998
1 file changed
+2
-8
@@ -2882,7 +2882,7 @@ public class ScriptDocument {
|
||||
String potentialVar = parts[parts.length - 1];
|
||||
|
||||
// Type patterns: primitives, or capitalized class names, or generic types
|
||||
if (isPrimitiveType(potentialType) ||
|
||||
if (TypeResolver.isPrimitiveType(potentialType) ||
|
||||
(Character.isUpperCase(potentialType.charAt(0)) && potentialType.matches("[A-Za-z_][A-Za-z0-9_<>\\[\\],\\s]*")) ||
|
||||
potentialType.equals("var") || potentialType.equals("let") || potentialType.equals("const")) {
|
||||
|
||||
@@ -2894,13 +2894,7 @@ public class ScriptDocument {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isPrimitiveType(String type) {
|
||||
return type.equals("int") || type.equals("long") || type.equals("short") || type.equals("byte") ||
|
||||
type.equals("float") || type.equals("double") || type.equals("boolean") || type.equals("char") ||
|
||||
type.equals("void");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create an AssignmentInfo for a reassignment statement and attach it to the appropriate FieldInfo.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user