Demo changes
This commit is contained in:
@@ -10,6 +10,14 @@ type Instructions []byte
|
||||
|
||||
type Opcode byte
|
||||
|
||||
func (o Opcode) String() string {
|
||||
def, err := Lookup(byte(o))
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return def.Name
|
||||
}
|
||||
|
||||
const (
|
||||
OpConstant Opcode = iota
|
||||
OpAdd
|
||||
|
||||
Reference in New Issue
Block a user