Skip to content

Commit

Permalink
Added documentation to Program. Closes #535
Browse files Browse the repository at this point in the history
  • Loading branch information
dop251 committed Oct 10, 2023
1 parent fc55792 commit acb9272
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ type srcMapItem struct {
srcPos int
}

// Program is an internal, compiled representation of code which is produced by the Compile function.
// This representation is not linked to a runtime in any way and can be used concurrently.
// It is always preferable to use a Program over a string when running code as it skips the compilation step.
type Program struct {
code []instruction
values []Value
Expand Down

0 comments on commit acb9272

Please sign in to comment.