Documentation ¶
Index ¶
- func ParseInputCode(code string, shouldRecover bool) (compiled runtime.IEval, err error)
- func ReplLoop(context ReplContext, shouldRecover bool)
- type ConsoleReplContext
- func (c *ConsoleReplContext) Context() *runtime.Context
- func (c ConsoleReplContext) OnEnter()
- func (c ConsoleReplContext) OnExit()
- func (c *ConsoleReplContext) ReadAction(shouldRecover bool) ReplAction
- func (c ConsoleReplContext) WriteException(e runtime.Exception)
- func (c ConsoleReplContext) WriteResult(result interface{})
- type ReplAction
- type ReplContext
- type ReplContextWithShouldWriteResult
- type ReplExit
- type ReplHintCode
- type ReplNoop
- type ReplRunCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseInputCode ¶ added in v1.0.12
func ReplLoop ¶
func ReplLoop(context ReplContext, shouldRecover bool)
Types ¶
type ConsoleReplContext ¶
type ConsoleReplContext struct {
// contains filtered or unexported fields
}
func NewConsoleReplContext ¶
func NewConsoleReplContext(isDebug, canEval bool) *ConsoleReplContext
func (*ConsoleReplContext) Context ¶
func (c *ConsoleReplContext) Context() *runtime.Context
func (ConsoleReplContext) OnEnter ¶
func (c ConsoleReplContext) OnEnter()
func (ConsoleReplContext) OnExit ¶
func (c ConsoleReplContext) OnExit()
func (*ConsoleReplContext) ReadAction ¶ added in v1.0.12
func (c *ConsoleReplContext) ReadAction(shouldRecover bool) ReplAction
func (ConsoleReplContext) WriteException ¶ added in v1.0.19
func (c ConsoleReplContext) WriteException(e runtime.Exception)
func (ConsoleReplContext) WriteResult ¶
func (c ConsoleReplContext) WriteResult(result interface{})
type ReplAction ¶ added in v1.0.12
type ReplAction interface {
Handle(context ReplContext, shouldRecover bool) (continueRunning bool)
}
type ReplContext ¶
type ReplContextWithShouldWriteResult ¶ added in v1.0.12
type ReplHintCode ¶ added in v1.0.12
type ReplHintCode string
func (ReplHintCode) Handle ¶ added in v1.0.12
func (rrc ReplHintCode) Handle(context ReplContext, shouldRecover bool) bool
type ReplRunCode ¶ added in v1.0.12
func (ReplRunCode) Handle ¶ added in v1.0.12
func (rrc ReplRunCode) Handle(context ReplContext, shouldRecover bool) (shouldContinue bool)
Click to show internal directories.
Click to hide internal directories.