diff --git a/build.gradle.kts b/build.gradle.kts index f09f474d..7105fb33 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,5 @@ import org.gradle.kotlin.dsl.cpp import java.nio.file.Files -import java.nio.file.Paths import java.util.Optional plugins { diff --git a/src/main/java/top/mcfpp/jni/Test.java b/src/main/java/top/mcfpp/jni/Test.java index ee882bfb..72573061 100644 --- a/src/main/java/top/mcfpp/jni/Test.java +++ b/src/main/java/top/mcfpp/jni/Test.java @@ -1,7 +1,6 @@ package top.mcfpp.jni; import java.io.File; -import java.net.URL; public class Test { static { diff --git a/src/main/java/top/mcfpp/lang/MCAnyData.java b/src/main/java/top/mcfpp/lang/MCAnyData.java index 58a3c271..fcd40f01 100644 --- a/src/main/java/top/mcfpp/lang/MCAnyData.java +++ b/src/main/java/top/mcfpp/lang/MCAnyData.java @@ -1,9 +1,7 @@ package top.mcfpp.lang; -import kotlin.NotImplementedError; import kotlin.jvm.functions.Function4; import org.jetbrains.annotations.NotNull; -import top.mcfpp.annotations.MCFPPNative; import top.mcfpp.lib.function.Function; import top.mcfpp.lib.function.MNIMethodContainer; import top.mcfpp.util.ValueWrapper; diff --git a/src/main/java/top/mcfpp/lang/MCIntData.java b/src/main/java/top/mcfpp/lang/MCIntData.java index e2598620..f99534ac 100644 --- a/src/main/java/top/mcfpp/lang/MCIntData.java +++ b/src/main/java/top/mcfpp/lang/MCIntData.java @@ -1,9 +1,7 @@ package top.mcfpp.lang; -import kotlin.NotImplementedError; import kotlin.jvm.functions.Function4; import org.jetbrains.annotations.NotNull; -import top.mcfpp.annotations.MCFPPNative; import top.mcfpp.lib.function.Function; import top.mcfpp.lib.function.MNIMethodContainer; import top.mcfpp.util.ValueWrapper; diff --git a/src/main/java/top/mcfpp/lang/NBTDictionaryData.java b/src/main/java/top/mcfpp/lang/NBTDictionaryData.java index d95f055f..df6374f7 100644 --- a/src/main/java/top/mcfpp/lang/NBTDictionaryData.java +++ b/src/main/java/top/mcfpp/lang/NBTDictionaryData.java @@ -1,6 +1,5 @@ package top.mcfpp.lang; -import kotlin.NotImplementedError; import kotlin.jvm.functions.Function4; import org.jetbrains.annotations.NotNull; import top.mcfpp.lib.function.MNIMethodContainer; diff --git a/src/main/java/top/mcfpp/lang/NBTListData.java b/src/main/java/top/mcfpp/lang/NBTListData.java index 8ca98440..ec2b6e72 100644 --- a/src/main/java/top/mcfpp/lang/NBTListData.java +++ b/src/main/java/top/mcfpp/lang/NBTListData.java @@ -1,23 +1,15 @@ package top.mcfpp.lang; -import kotlin.NotImplementedError; import kotlin.jvm.functions.Function4; import net.querz.nbt.io.SNBTUtil; -import net.querz.nbt.tag.IntTag; -import net.querz.nbt.tag.ListTag; import net.querz.nbt.tag.Tag; import org.jetbrains.annotations.NotNull; import top.mcfpp.Project; -import top.mcfpp.annotations.MCFPPNative; import top.mcfpp.lib.function.Function; import top.mcfpp.lib.function.MNIMethodContainer; -import top.mcfpp.util.LogProcessor; import top.mcfpp.util.NBTUtil; import top.mcfpp.util.ValueWrapper; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; public class NBTListData extends MNIMethodContainer { diff --git a/src/main/java/top/mcfpp/lang/NBTMapData.java b/src/main/java/top/mcfpp/lang/NBTMapData.java index f6fc8ef2..f6841eca 100644 --- a/src/main/java/top/mcfpp/lang/NBTMapData.java +++ b/src/main/java/top/mcfpp/lang/NBTMapData.java @@ -1,6 +1,5 @@ package top.mcfpp.lang; -import kotlin.NotImplementedError; import kotlin.jvm.functions.Function4; import org.jetbrains.annotations.NotNull; import top.mcfpp.lib.function.MNIMethodContainer; diff --git a/src/main/java/top/mcfpp/lang/System.java b/src/main/java/top/mcfpp/lang/System.java index 2cad5387..136e804e 100644 --- a/src/main/java/top/mcfpp/lang/System.java +++ b/src/main/java/top/mcfpp/lang/System.java @@ -1,15 +1,12 @@ package top.mcfpp.lang; import kotlin.jvm.functions.Function4; -import net.querz.nbt.tag.StringTag; import org.jetbrains.annotations.NotNull; import top.mcfpp.annotations.InsertCommand; -import top.mcfpp.annotations.MCFPPNative; import top.mcfpp.lib.function.Function; import top.mcfpp.lib.function.MNIMethodContainer; import top.mcfpp.util.ValueWrapper; -import java.util.ArrayList; import java.util.HashMap; public class System extends MNIMethodContainer { diff --git a/src/main/kotlin/top/mcfpp/antlr/McfppGenericClassVisitor.kt b/src/main/kotlin/top/mcfpp/antlr/McfppGenericClassVisitor.kt index 548a0069..1c8afa0d 100644 --- a/src/main/kotlin/top/mcfpp/antlr/McfppGenericClassVisitor.kt +++ b/src/main/kotlin/top/mcfpp/antlr/McfppGenericClassVisitor.kt @@ -1,10 +1,8 @@ package top.mcfpp.antlr import top.mcfpp.Project -import top.mcfpp.exception.UndefinedException import top.mcfpp.io.McfppFile import top.mcfpp.lib.Class -import top.mcfpp.lib.field.GlobalField import top.mcfpp.lib.function.Constructor import top.mcfpp.lib.function.Function import top.mcfpp.util.LogProcessor diff --git a/src/main/kotlin/top/mcfpp/antlr/McfppLeftExprVisitor.kt b/src/main/kotlin/top/mcfpp/antlr/McfppLeftExprVisitor.kt index cc6b02be..1e5ee9d3 100644 --- a/src/main/kotlin/top/mcfpp/antlr/McfppLeftExprVisitor.kt +++ b/src/main/kotlin/top/mcfpp/antlr/McfppLeftExprVisitor.kt @@ -3,7 +3,6 @@ package top.mcfpp.antlr import top.mcfpp.Project import top.mcfpp.annotations.InsertCommand import top.mcfpp.lang.* -import top.mcfpp.lang.type.MCFPPGenericClassType import top.mcfpp.lib.* import top.mcfpp.lib.function.Function import top.mcfpp.lib.field.GlobalField diff --git a/src/main/kotlin/top/mcfpp/antlr/McfppTypeVisitor.kt b/src/main/kotlin/top/mcfpp/antlr/McfppTypeVisitor.kt index 288cfcf6..38269351 100644 --- a/src/main/kotlin/top/mcfpp/antlr/McfppTypeVisitor.kt +++ b/src/main/kotlin/top/mcfpp/antlr/McfppTypeVisitor.kt @@ -7,7 +7,6 @@ import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.* import top.mcfpp.lib.field.GlobalField import top.mcfpp.lib.field.NamespaceField -import top.mcfpp.lib.function.FunctionParam import top.mcfpp.lib.generic.ClassParam import top.mcfpp.lib.generic.GenericClass import top.mcfpp.util.LazyWrapper diff --git a/src/main/kotlin/top/mcfpp/compiletime/MCControl.kt b/src/main/kotlin/top/mcfpp/compiletime/MCControl.kt index a11d110e..4136cf98 100644 --- a/src/main/kotlin/top/mcfpp/compiletime/MCControl.kt +++ b/src/main/kotlin/top/mcfpp/compiletime/MCControl.kt @@ -1,7 +1,5 @@ package top.mcfpp.compiletime -import top.mcfpp.lang.Var - sealed class MCControl { object Break:MCControl(); object Continue:MCControl(); diff --git a/src/main/kotlin/top/mcfpp/io/LibReader.kt b/src/main/kotlin/top/mcfpp/io/LibReader.kt index f034936c..4bf338b1 100644 --- a/src/main/kotlin/top/mcfpp/io/LibReader.kt +++ b/src/main/kotlin/top/mcfpp/io/LibReader.kt @@ -2,7 +2,6 @@ package top.mcfpp.io import com.alibaba.fastjson2.JSONArray import com.alibaba.fastjson2.JSONObject -import top.mcfpp.Project import top.mcfpp.exception.IllegalFormatException import top.mcfpp.lang.UnresolvedVar import top.mcfpp.lang.type.MCFPPBaseType diff --git a/src/main/kotlin/top/mcfpp/lang/MCFPPTypeVar.kt b/src/main/kotlin/top/mcfpp/lang/MCFPPTypeVar.kt index 3223f90e..daae6cd0 100644 --- a/src/main/kotlin/top/mcfpp/lang/MCFPPTypeVar.kt +++ b/src/main/kotlin/top/mcfpp/lang/MCFPPTypeVar.kt @@ -5,8 +5,6 @@ import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.CompoundData import top.mcfpp.lib.function.Function import top.mcfpp.lib.Member -import top.mcfpp.lib.field.IFieldWithType -import java.util.* class MCFPPTypeVar : Var { diff --git a/src/main/kotlin/top/mcfpp/lang/NBTDictionary.kt b/src/main/kotlin/top/mcfpp/lang/NBTDictionary.kt index 9418d622..e45a278f 100644 --- a/src/main/kotlin/top/mcfpp/lang/NBTDictionary.kt +++ b/src/main/kotlin/top/mcfpp/lang/NBTDictionary.kt @@ -1,9 +1,7 @@ package top.mcfpp.lang import net.querz.nbt.tag.CompoundTag -import net.querz.nbt.tag.ListTag import net.querz.nbt.tag.StringTag -import net.querz.nbt.tag.Tag import top.mcfpp.exception.VariableConverseException import top.mcfpp.lang.type.* import top.mcfpp.lib.* diff --git a/src/main/kotlin/top/mcfpp/lang/NBTMap.kt b/src/main/kotlin/top/mcfpp/lang/NBTMap.kt index 31ff40f3..d3880143 100644 --- a/src/main/kotlin/top/mcfpp/lang/NBTMap.kt +++ b/src/main/kotlin/top/mcfpp/lang/NBTMap.kt @@ -1,14 +1,12 @@ package top.mcfpp.lang import net.querz.nbt.tag.CompoundTag -import net.querz.nbt.tag.Tag import top.mcfpp.exception.VariableConverseException import top.mcfpp.lang.type.* import top.mcfpp.lib.CompoundData import top.mcfpp.lib.FieldContainer import top.mcfpp.lib.function.NativeFunction import java.util.* -import kotlin.reflect.jvm.javaMethod class NBTMap : NBTDictionary{ diff --git a/src/main/kotlin/top/mcfpp/lang/type/MCFPPBaseType.kt b/src/main/kotlin/top/mcfpp/lang/type/MCFPPBaseType.kt index 6dd426e5..bf1b680c 100644 --- a/src/main/kotlin/top/mcfpp/lang/type/MCFPPBaseType.kt +++ b/src/main/kotlin/top/mcfpp/lang/type/MCFPPBaseType.kt @@ -1,7 +1,6 @@ package top.mcfpp.lang.type import top.mcfpp.lang.* -import top.mcfpp.lang.Void import top.mcfpp.util.ResourceLocation /** diff --git a/src/main/kotlin/top/mcfpp/lib/NativeClass.kt b/src/main/kotlin/top/mcfpp/lib/NativeClass.kt index c28cb697..ffb39dd9 100644 --- a/src/main/kotlin/top/mcfpp/lib/NativeClass.kt +++ b/src/main/kotlin/top/mcfpp/lib/NativeClass.kt @@ -2,7 +2,6 @@ package top.mcfpp.lib import top.mcfpp.Project import top.mcfpp.lang.* -import java.lang.reflect.InvocationTargetException import java.lang.Class /** diff --git a/src/main/kotlin/top/mcfpp/lib/Template.kt b/src/main/kotlin/top/mcfpp/lib/Template.kt index d491e785..9d51c040 100644 --- a/src/main/kotlin/top/mcfpp/lib/Template.kt +++ b/src/main/kotlin/top/mcfpp/lib/Template.kt @@ -4,7 +4,6 @@ import top.mcfpp.Project import top.mcfpp.lang.type.MCFPPTemplateType import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.field.CompoundDataField -import top.mcfpp.lib.function.Constructor import top.mcfpp.lib.function.TemplateConstructor import top.mcfpp.util.LazyWrapper diff --git a/src/main/kotlin/top/mcfpp/lib/UnknownClass.kt b/src/main/kotlin/top/mcfpp/lib/UnknownClass.kt index 5148ee94..2e904e84 100644 --- a/src/main/kotlin/top/mcfpp/lib/UnknownClass.kt +++ b/src/main/kotlin/top/mcfpp/lib/UnknownClass.kt @@ -1,7 +1,5 @@ package top.mcfpp.lib -import top.mcfpp.Project - class UnknownClass(identifier: String, namespace: String): Class(identifier, namespace) { } \ No newline at end of file diff --git a/src/main/kotlin/top/mcfpp/lib/field/CompoundDataField.kt b/src/main/kotlin/top/mcfpp/lib/field/CompoundDataField.kt index 8463faf2..f2f2502a 100644 --- a/src/main/kotlin/top/mcfpp/lib/field/CompoundDataField.kt +++ b/src/main/kotlin/top/mcfpp/lib/field/CompoundDataField.kt @@ -5,7 +5,6 @@ import top.mcfpp.lang.Var import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.* import top.mcfpp.lib.function.Function -import top.mcfpp.lib.function.FunctionParam import top.mcfpp.lib.function.UnknownFunction import top.mcfpp.lib.generic.Generic import top.mcfpp.util.LazyWrapper diff --git a/src/main/kotlin/top/mcfpp/lib/field/IField.kt b/src/main/kotlin/top/mcfpp/lib/field/IField.kt index 077e8569..8510b489 100644 --- a/src/main/kotlin/top/mcfpp/lib/field/IField.kt +++ b/src/main/kotlin/top/mcfpp/lib/field/IField.kt @@ -1,8 +1,5 @@ package top.mcfpp.lib.field -import java.io.Serializable - - /** * 一个域。在编译过程中,编译器读取到的变量,函数等会以键值对的方式储存在其中。键为函数的id或者变量的 * 标识符,而值则是这个函数或者变量的对象。 diff --git a/src/main/kotlin/top/mcfpp/lib/field/IFieldWithType.kt b/src/main/kotlin/top/mcfpp/lib/field/IFieldWithType.kt index f7e236e9..4e5039f1 100644 --- a/src/main/kotlin/top/mcfpp/lib/field/IFieldWithType.kt +++ b/src/main/kotlin/top/mcfpp/lib/field/IFieldWithType.kt @@ -1,6 +1,5 @@ package top.mcfpp.lib.field -import top.mcfpp.lang.Var import top.mcfpp.lang.type.MCFPPType interface IFieldWithType : IField { diff --git a/src/main/kotlin/top/mcfpp/lib/field/NamespaceField.kt b/src/main/kotlin/top/mcfpp/lib/field/NamespaceField.kt index 8cd7fa42..fcccfeec 100644 --- a/src/main/kotlin/top/mcfpp/lib/field/NamespaceField.kt +++ b/src/main/kotlin/top/mcfpp/lib/field/NamespaceField.kt @@ -5,7 +5,6 @@ import top.mcfpp.lang.* import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.* import top.mcfpp.lib.function.Function -import top.mcfpp.lib.function.FunctionParam import top.mcfpp.lib.generic.Generic import kotlin.collections.ArrayList import kotlin.collections.HashMap diff --git a/src/main/kotlin/top/mcfpp/lib/field/SimpleFieldWithFunction.kt b/src/main/kotlin/top/mcfpp/lib/field/SimpleFieldWithFunction.kt index 298d6726..9fee049c 100644 --- a/src/main/kotlin/top/mcfpp/lib/field/SimpleFieldWithFunction.kt +++ b/src/main/kotlin/top/mcfpp/lib/field/SimpleFieldWithFunction.kt @@ -3,7 +3,6 @@ package top.mcfpp.lib.field import org.jetbrains.annotations.Nullable import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.function.Function -import top.mcfpp.lib.function.FunctionParam import top.mcfpp.lib.generic.Generic /** diff --git a/src/main/kotlin/top/mcfpp/lib/function/NativeFunction.kt b/src/main/kotlin/top/mcfpp/lib/function/NativeFunction.kt index 9caf7b76..28a46533 100644 --- a/src/main/kotlin/top/mcfpp/lib/function/NativeFunction.kt +++ b/src/main/kotlin/top/mcfpp/lib/function/NativeFunction.kt @@ -4,12 +4,8 @@ import top.mcfpp.Project import top.mcfpp.lang.* import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.Native -import top.mcfpp.util.LogProcessor import top.mcfpp.util.ValueWrapper -import java.lang.reflect.InvocationTargetException -import java.lang.Class import java.lang.Void -import java.util.Dictionary /** * 表示了一个native方法 diff --git a/src/main/kotlin/top/mcfpp/lib/generic/GenericClass.kt b/src/main/kotlin/top/mcfpp/lib/generic/GenericClass.kt index 98e1292c..f414ce97 100644 --- a/src/main/kotlin/top/mcfpp/lib/generic/GenericClass.kt +++ b/src/main/kotlin/top/mcfpp/lib/generic/GenericClass.kt @@ -2,23 +2,11 @@ package top.mcfpp.lib.generic import top.mcfpp.antlr.mcfppParser import top.mcfpp.Project -import top.mcfpp.antlr.McfppFieldVisitor import top.mcfpp.antlr.McfppGenericClassVisitor -import top.mcfpp.io.McfppFile -import top.mcfpp.lang.MCAny import top.mcfpp.lang.MCFPPTypeVar import top.mcfpp.lang.Var -import top.mcfpp.lang.type.MCFPPGenericClassType -import top.mcfpp.lang.type.MCFPPType import top.mcfpp.lib.Class -import top.mcfpp.lib.CompoundData import top.mcfpp.lib.field.GlobalField -import top.mcfpp.lib.field.SimpleFieldWithVar -import top.mcfpp.lib.function.Constructor -import top.mcfpp.lib.function.Function -import top.mcfpp.lib.function.FunctionParam -import top.mcfpp.util.LogProcessor -import top.mcfpp.util.StringHelper class GenericClass : Class { diff --git a/src/main/kotlin/top/mcfpp/util/AntlrUtil.kt b/src/main/kotlin/top/mcfpp/util/AntlrUtil.kt index 4e19072b..00f07b98 100644 --- a/src/main/kotlin/top/mcfpp/util/AntlrUtil.kt +++ b/src/main/kotlin/top/mcfpp/util/AntlrUtil.kt @@ -1,6 +1,5 @@ package top.mcfpp.util -import org.antlr.v4.runtime.ParserRuleContext import org.antlr.v4.runtime.tree.ParseTree object AntlrUtil { diff --git a/src/main/kotlin/top/mcfpp/util/LazyWrapper.kt b/src/main/kotlin/top/mcfpp/util/LazyWrapper.kt index 3f66696c..feb97db7 100644 --- a/src/main/kotlin/top/mcfpp/util/LazyWrapper.kt +++ b/src/main/kotlin/top/mcfpp/util/LazyWrapper.kt @@ -1,8 +1,5 @@ package top.mcfpp.util -import top.mcfpp.lang.Var - - /** * 懒加载包装器 * @param T 被包装的对象的类型 diff --git a/src/main/kotlin/top/mcfpp/util/Utils.kt b/src/main/kotlin/top/mcfpp/util/Utils.kt index 1da949cf..79dfdb70 100644 --- a/src/main/kotlin/top/mcfpp/util/Utils.kt +++ b/src/main/kotlin/top/mcfpp/util/Utils.kt @@ -1,7 +1,6 @@ package top.mcfpp.util import net.querz.nbt.tag.IntArrayTag -import top.mcfpp.Project import java.util.UUID import kotlin.system.exitProcess diff --git a/src/test/kotlin/top/mcfpp/test/CommandTreeDeserializeTest.kt b/src/test/kotlin/top/mcfpp/test/CommandTreeDeserializeTest.kt index 45c049ef..c8406105 100644 --- a/src/test/kotlin/top/mcfpp/test/CommandTreeDeserializeTest.kt +++ b/src/test/kotlin/top/mcfpp/test/CommandTreeDeserializeTest.kt @@ -5,7 +5,6 @@ import top.mcfpp.Project import top.mcfpp.command.tree.CommandTreeNode import top.mcfpp.command.tree.DownloadHelper import java.nio.file.Path -import kotlin.io.path.absolutePathString import kotlin.test.Test class CommandTreeDeserializeTest { @Test diff --git a/src/test/kotlin/top/mcfpp/test/NBTAnyDataTypeTest.kt b/src/test/kotlin/top/mcfpp/test/NBTAnyDataTypeTest.kt index 6a9c3abb..60a8f1f5 100644 --- a/src/test/kotlin/top/mcfpp/test/NBTAnyDataTypeTest.kt +++ b/src/test/kotlin/top/mcfpp/test/NBTAnyDataTypeTest.kt @@ -1,6 +1,5 @@ package top.mcfpp.test -import top.mcfpp.lib.field.GlobalField import kotlin.test.Test class NBTTypeTest {