vm: add State() method to get a state description

This commit is contained in:
Roman Khimov 2019-10-29 18:26:04 +03:00
parent a568740f56
commit 47f66dfbf3

View file

@ -248,6 +248,11 @@ func (v *VM) Stack(n string) string {
return buildStackOutput(s)
}
// State returns string representation of the state for the VM.
func (v *VM) State() string {
return v.state.String()
}
// Ready returns true if the VM ready to execute the loaded program.
// Will return false if no program is loaded.
func (v *VM) Ready() bool {