From acb9272656cf1c8d914295720046601a9a82e9ed Mon Sep 17 00:00:00 2001 From: Dmitry Panov Date: Tue, 10 Oct 2023 11:49:25 +0100 Subject: [PATCH] Added documentation to Program. Closes #535 --- compiler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler.go b/compiler.go index cbe0a99c..967b0a05 100644 --- a/compiler.go +++ b/compiler.go @@ -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