public final class ReplCreator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ReplConsole |
console |
protected org.panda_lang.framework.design.interpreter.parser.Context |
context |
protected ReplExceptionListener |
exceptionListener |
protected org.panda_lang.utilities.commons.function.ThrowingFunction<org.panda_lang.framework.design.runtime.ProcessStack,Object,Exception> |
instanceSupplier |
protected Supplier<org.panda_lang.framework.design.runtime.Process> |
processSupplier |
protected org.panda_lang.panda.shell.repl.ReplScope |
replScope |
protected org.panda_lang.framework.language.architecture.type.TypeScope |
typeScope |
| Modifier and Type | Method and Description |
|---|---|
ReplCreator |
addVariableChangeListener(ReplVariableChangeListener variableChangeListener)
Register variable change listener
|
Repl |
create()
Create REPL
|
ReplCreator |
define(org.panda_lang.framework.language.architecture.type.PandaMethod method)
Define a method in the repl type
|
org.panda_lang.framework.design.interpreter.parser.Context |
getContext() |
ReplCreator |
variable(org.panda_lang.framework.language.architecture.statement.PandaVariableData variableData,
@Nullable Object defaultValue)
Define variable in the repl scope
|
ReplCreator |
withCustomExceptionListener(@Nullable ReplExceptionListener exceptionListener)
Set custom exception handler, by default exceptions are passed through the
Messenger |
protected final ReplConsole console
protected final org.panda_lang.framework.design.interpreter.parser.Context context
protected final org.panda_lang.framework.language.architecture.type.TypeScope typeScope
protected final org.panda_lang.panda.shell.repl.ReplScope replScope
protected ReplExceptionListener exceptionListener
protected Supplier<org.panda_lang.framework.design.runtime.Process> processSupplier
public Repl create() throws Exception
Exception - if something happenpublic ReplCreator define(org.panda_lang.framework.language.architecture.type.PandaMethod method)
method - the method to registerpublic ReplCreator variable(org.panda_lang.framework.language.architecture.statement.PandaVariableData variableData, @Nullable @Nullable Object defaultValue)
variableData - the variable to registerdefaultValue - value of variable assigned by defaultpublic ReplCreator addVariableChangeListener(ReplVariableChangeListener variableChangeListener)
variableChangeListener - the listener to registerpublic ReplCreator withCustomExceptionListener(@Nullable @Nullable ReplExceptionListener exceptionListener)
MessengerexceptionListener - a new exception listenerpublic org.panda_lang.framework.design.interpreter.parser.Context getContext()
Copyright © 2020. All rights reserved.