refactor: move debugging logic out of core
This commit is contained in:
parent
d1937fdb63
commit
8156a1733f
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.utils.mapping;
|
||||
package me.topchetoeu.jscript.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,5 +0,0 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
|
||||
public interface Debugger extends DebugHandler, DebugController {
|
||||
void close();
|
||||
}
|
@ -8,21 +8,17 @@ import java.nio.file.Path;
|
||||
import me.topchetoeu.jscript.common.Filename;
|
||||
import me.topchetoeu.jscript.common.Metadata;
|
||||
import me.topchetoeu.jscript.common.Reading;
|
||||
import me.topchetoeu.jscript.core.engine.Context;
|
||||
import me.topchetoeu.jscript.core.engine.Engine;
|
||||
import me.topchetoeu.jscript.core.engine.Environment;
|
||||
import me.topchetoeu.jscript.core.engine.debug.DebugContext;
|
||||
import me.topchetoeu.jscript.core.engine.debug.DebugServer;
|
||||
import me.topchetoeu.jscript.core.engine.debug.SimpleDebugger;
|
||||
import me.topchetoeu.jscript.core.engine.values.ArrayValue;
|
||||
import me.topchetoeu.jscript.core.engine.values.NativeFunction;
|
||||
import me.topchetoeu.jscript.core.engine.values.ObjectValue;
|
||||
import me.topchetoeu.jscript.core.engine.values.Values;
|
||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
||||
import me.topchetoeu.jscript.core.exceptions.InterruptException;
|
||||
import me.topchetoeu.jscript.core.exceptions.SyntaxException;
|
||||
import me.topchetoeu.jscript.lib.EnvironmentLib;
|
||||
import me.topchetoeu.jscript.lib.Internals;
|
||||
import me.topchetoeu.jscript.utils.debug.DebugServer;
|
||||
import me.topchetoeu.jscript.utils.debug.SimpleDebugger;
|
||||
import me.topchetoeu.jscript.utils.filesystem.Filesystem;
|
||||
import me.topchetoeu.jscript.utils.filesystem.MemoryFilesystem;
|
||||
import me.topchetoeu.jscript.utils.filesystem.Mode;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
@ -15,7 +15,7 @@ import me.topchetoeu.jscript.common.events.Notifier;
|
||||
import me.topchetoeu.jscript.common.json.JSON;
|
||||
import me.topchetoeu.jscript.common.json.JSONList;
|
||||
import me.topchetoeu.jscript.common.json.JSONMap;
|
||||
import me.topchetoeu.jscript.core.engine.debug.WebSocketMessage.Type;
|
||||
import me.topchetoeu.jscript.utils.debug.WebSocketMessage.Type;
|
||||
import me.topchetoeu.jscript.core.exceptions.SyntaxException;
|
||||
|
||||
public class DebugServer {
|
7
src/me/topchetoeu/jscript/utils/debug/Debugger.java
Normal file
7
src/me/topchetoeu/jscript/utils/debug/Debugger.java
Normal file
@ -0,0 +1,7 @@
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import me.topchetoeu.jscript.core.engine.debug.DebugController;
|
||||
|
||||
public interface Debugger extends DebugHandler, DebugController {
|
||||
void close();
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
public interface DebuggerProvider {
|
||||
Debugger getDebugger(WebSocket socket, HttpRequest req);
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@ -22,6 +22,7 @@ import me.topchetoeu.jscript.core.compilation.Instruction.Type;
|
||||
import me.topchetoeu.jscript.core.engine.Context;
|
||||
import me.topchetoeu.jscript.core.engine.Engine;
|
||||
import me.topchetoeu.jscript.core.engine.Environment;
|
||||
import me.topchetoeu.jscript.core.engine.debug.DebugContext;
|
||||
import me.topchetoeu.jscript.core.engine.frame.CodeFrame;
|
||||
import me.topchetoeu.jscript.core.engine.scope.GlobalScope;
|
||||
import me.topchetoeu.jscript.core.engine.values.ArrayValue;
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import me.topchetoeu.jscript.common.json.JSON;
|
||||
import me.topchetoeu.jscript.common.json.JSONMap;
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import me.topchetoeu.jscript.common.json.JSON;
|
||||
import me.topchetoeu.jscript.common.json.JSONMap;
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import me.topchetoeu.jscript.common.json.JSON;
|
||||
import me.topchetoeu.jscript.common.json.JSONMap;
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@ -6,7 +6,7 @@ import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
|
||||
import me.topchetoeu.jscript.core.engine.debug.WebSocketMessage.Type;
|
||||
import me.topchetoeu.jscript.utils.debug.WebSocketMessage.Type;
|
||||
|
||||
public class WebSocket implements AutoCloseable {
|
||||
public long maxLength = 1 << 20;
|
@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.jscript.core.engine.debug;
|
||||
package me.topchetoeu.jscript.utils.debug;
|
||||
|
||||
public class WebSocketMessage {
|
||||
public static enum Type {
|
@ -6,6 +6,7 @@ import java.util.TreeMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import me.topchetoeu.jscript.common.Location;
|
||||
import me.topchetoeu.jscript.common.VLQ;
|
||||
import me.topchetoeu.jscript.common.json.JSON;
|
||||
|
||||
public class SourceMap {
|
||||
|
Loading…
Reference in New Issue
Block a user