Skip to content

Commit e53cefe

Browse files
committedFeb 11, 2024
Add program.Locations()
1 parent 894cea1 commit e53cefe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎vm/program.go

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ func (program *Program) Node() ast.Node {
6464
return program.node
6565
}
6666

67+
// Locations returns a slice of bytecode's locations.
68+
func (program *Program) Locations() []file.Location {
69+
return program.locations
70+
}
71+
6772
// Disassemble returns opcodes as a string.
6873
func (program *Program) Disassemble() string {
6974
var buf bytes.Buffer

0 commit comments

Comments
 (0)
Please sign in to comment.