Skip to content

Commit

Permalink
Add program.Locations()
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Feb 11, 2024
1 parent 894cea1 commit e53cefe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vm/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ func (program *Program) Node() ast.Node {
return program.node
}

// Locations returns a slice of bytecode's locations.
func (program *Program) Locations() []file.Location {
return program.locations
}

// Disassemble returns opcodes as a string.
func (program *Program) Disassemble() string {
var buf bytes.Buffer
Expand Down

0 comments on commit e53cefe

Please sign in to comment.