diff --git a/dev.thihup.jvisualg.backend/dev.thihup.jvisualg.backend.java/src/main/java/dev/thihup/jvisualg/backend/java/JavaBackend.java b/dev.thihup.jvisualg.backend/dev.thihup.jvisualg.backend.java/src/main/java/dev/thihup/jvisualg/backend/java/JavaBackend.java index 6791400..e60ccf2 100644 --- a/dev.thihup.jvisualg.backend/dev.thihup.jvisualg.backend.java/src/main/java/dev/thihup/jvisualg/backend/java/JavaBackend.java +++ b/dev.thihup.jvisualg.backend/dev.thihup.jvisualg.backend.java/src/main/java/dev/thihup/jvisualg/backend/java/JavaBackend.java @@ -1,6 +1,5 @@ package dev.thihup.jvisualg.backend.java; -import dev.thihup.jvisualg.frontend.node.Location; import dev.thihup.jvisualg.frontend.node.Node; import java.util.List; diff --git a/dev.thihup.jvisualg.frontend/src/main/java/dev/thihup/jvisualg/frontend/node/Location.java b/dev.thihup.jvisualg.frontend/src/main/java/dev/thihup/jvisualg/frontend/node/Location.java index cd2cf4d..dbdb395 100644 --- a/dev.thihup.jvisualg.frontend/src/main/java/dev/thihup/jvisualg/frontend/node/Location.java +++ b/dev.thihup.jvisualg.frontend/src/main/java/dev/thihup/jvisualg/frontend/node/Location.java @@ -1,7 +1,5 @@ package dev.thihup.jvisualg.frontend.node; -import org.antlr.v4.runtime.ParserRuleContext; - public record Location( int startLine, int startColumn, diff --git a/dev.thihup.jvisualg.frontend/src/test/java/dev/thihup/jvisualg/frontend/MainTest.java b/dev.thihup.jvisualg.frontend/src/test/java/dev/thihup/jvisualg/frontend/MainTest.java index 97b8a1d..aff81f7 100644 --- a/dev.thihup.jvisualg.frontend/src/test/java/dev/thihup/jvisualg/frontend/MainTest.java +++ b/dev.thihup.jvisualg.frontend/src/test/java/dev/thihup/jvisualg/frontend/MainTest.java @@ -1,13 +1,10 @@ package dev.thihup.jvisualg.frontend; -import dev.thihup.jvisualg.frontend.node.Node; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.nio.file.Files; import java.nio.file.Path; -import java.util.List; -import java.util.function.Function; import java.util.stream.Stream; class MainTest { diff --git a/dev.thihup.jvisualg.ide/src/main/java/dev/thihup/jvisualg/ide/Main.java b/dev.thihup.jvisualg.ide/src/main/java/dev/thihup/jvisualg/ide/Main.java index f21fe8d..30147ce 100644 --- a/dev.thihup.jvisualg.ide/src/main/java/dev/thihup/jvisualg/ide/Main.java +++ b/dev.thihup.jvisualg.ide/src/main/java/dev/thihup/jvisualg/ide/Main.java @@ -19,8 +19,6 @@ import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.debug.InitializeRequestArguments; import org.eclipse.lsp4j.debug.OutputEventArguments; -import org.eclipse.lsp4j.debug.SetBreakpointsArguments; -import org.eclipse.lsp4j.debug.SourceBreakpoint; import org.eclipse.lsp4j.debug.launch.DSPLauncher; import org.eclipse.lsp4j.debug.services.IDebugProtocolServer; import org.eclipse.lsp4j.jsonrpc.Launcher; diff --git a/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/DAPServer.java b/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/DAPServer.java index ee7fb1f..dab3107 100644 --- a/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/DAPServer.java +++ b/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/DAPServer.java @@ -4,7 +4,6 @@ import dev.thihup.jvisualg.frontend.Main; import dev.thihup.jvisualg.frontend.node.Location; import org.eclipse.lsp4j.debug.*; -import org.eclipse.lsp4j.debug.services.IDebugProtocolClient; import org.eclipse.lsp4j.debug.services.IDebugProtocolServer; import java.io.*; diff --git a/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/Interpreter.java b/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/Interpreter.java index 4aa6ffa..e0e172b 100644 --- a/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/Interpreter.java +++ b/dev.thihup.jvisualg.interpreter/src/main/java/dev/thihup/jvisualg/interpreter/Interpreter.java @@ -1,10 +1,7 @@ package dev.thihup.jvisualg.interpreter; -import dev.thihup.jvisualg.frontend.ASTResult; -import dev.thihup.jvisualg.frontend.Main; import dev.thihup.jvisualg.frontend.node.Location; import dev.thihup.jvisualg.frontend.node.Node; -import org.antlr.v4.runtime.misc.Pair; import java.io.*; import java.math.RoundingMode; diff --git a/dev.thihup.jvisualg.interpreter/src/test/java/dev/thihup/jvisualg/interpreter/InterpreterTest.java b/dev.thihup.jvisualg.interpreter/src/test/java/dev/thihup/jvisualg/interpreter/InterpreterTest.java index c0d4135..23dd042 100644 --- a/dev.thihup.jvisualg.interpreter/src/test/java/dev/thihup/jvisualg/interpreter/InterpreterTest.java +++ b/dev.thihup.jvisualg.interpreter/src/test/java/dev/thihup/jvisualg/interpreter/InterpreterTest.java @@ -2,11 +2,9 @@ import dev.thihup.jvisualg.frontend.Main; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.EnumSource; import java.io.*; -import java.math.RoundingMode; +import java.util.concurrent.locks.ReentrantLock; import static org.junit.jupiter.api.Assertions.*; @@ -14,7 +12,7 @@ class InterpreterTest { @Test void test() { StringWriter stringWriter = new StringWriter(); - new Interpreter(Reader.nullReader(), stringWriter) + new Interpreter(Reader.nullReader(), stringWriter, new ReentrantLock()) .run(Main.buildAST(new ByteArrayInputStream(""" algoritmo "Teste" var @@ -443,7 +441,7 @@ public int read(char[] cbuf, int off, int len) throws IOException { } }; - new Interpreter(stringReader, stringWriter) + new Interpreter(stringReader, stringWriter, new ReentrantLock()) .run(Main.buildAST(new ByteArrayInputStream(""" algoritmo "Teste" var