public class DebugContext extends Context
beginColumn, beginLine, defaultErrorStream, defaultOutputStream, defaultTerminalStream, depth, endLine, environment, importEnv, loadingResource, moduleList, provideTable, unitTable
Constructor and Description |
---|
DebugContext() |
DebugContext(Context context) |
DebugContext(Package pkg) |
Modifier and Type | Method and Description |
---|---|
void |
addCommandListener(CommandListener listener) |
java.lang.Object |
clone(boolean clear_attributes,
boolean clear_locals,
boolean clear_listeners) |
protected void |
close(Function f,
java.lang.Object[] args)
Tracks stack depth (function return) in pure interpreter.
|
protected int |
getBeginLine() |
int |
getCallDepth()
Get the stack depth (in pure interpreter)
|
Debugger |
getDebugger()
Returns the debugger that controls this debug context
|
protected int |
getEndLine() |
int |
getEvalDepth()
Get the depth of evaluation.
|
protected java.lang.Object |
getScriptSource()
Get the source of the script.
|
protected void |
onError(java.lang.Throwable t)
This method is called when some exception is thrown.
|
protected void |
onExit(java.lang.Object arg)
This method is called when an evaluation is terminated normally.
|
protected void |
open(Function f,
java.lang.Object[] args)
Tracks stack depth (function call) in pure interpreter.
|
void |
removeCommandListener(CommandListener listener) |
void |
setDebugger(Debugger debugger)
Registers the specified debugger as the controller of this debug context
|
protected void |
updateLine(SimpleNode node,
int beginLine,
int beginColumn)
This method is called when line number is changed.
|
autoload, autoload, clearPackages, clone, clone, defined, get, getClassLoader, getConfiguration, getCurrentPackage, getErrorStream, getErrorWriter, getExitHook, getId, getImplementation, getName, getOutputStream, getPnutsImpl, getScriptEncoding, getTerminalStream, getTerminalWriter, getValue, getWriter, isVerbose, keys, loadModule, registerQuantityFactory, resolveClass, resolveSymbol, set, setClassLoader, setConfiguration, setCurrentPackage, setErrorStream, setErrorStream, setErrorWriter, setErrorWriter, setExitHook, setImplementation, setName, setOutputStream, setOutputStream, setOutputStream, setPnutsImpl, setScriptEncoding, setTerminalStream, setTerminalStream, setTerminalWriter, setTerminalWriter, setValue, setVerbose, setWriter, setWriter, unusePackage, updateColumn, updateLine, usedPackages, usePackage, usePackage, usePackage
public DebugContext()
public DebugContext(Package pkg)
public DebugContext(Context context)
public void setDebugger(Debugger debugger)
public Debugger getDebugger()
protected void open(Function f, java.lang.Object[] args)
protected void close(Function f, java.lang.Object[] args)
public int getEvalDepth()
public int getCallDepth()
protected int getBeginLine()
protected int getEndLine()
protected java.lang.Object getScriptSource()
Context
getScriptSource
in class Context
java.net.URL object, when the script is not precompiled pnuts.lang.Runtime object, when the script is precompiled
protected void updateLine(SimpleNode node, int beginLine, int beginColumn)
updateLine
in class Context
node
- the current AST nodebeginLine
- the line number at which the current expression starts.beginColumn
- the column number at which theh current expression ends.protected void onError(java.lang.Throwable t)
protected void onExit(java.lang.Object arg)
public void addCommandListener(CommandListener listener)
public void removeCommandListener(CommandListener listener)
public java.lang.Object clone(boolean clear_attributes, boolean clear_locals, boolean clear_listeners)