Description

Compile will parse the given source and return a Script value or nil and an error if there was a problem during compilation.

script, err := vm.Compile("", `var abc; if (!abc) abc = 0; abc += 2; abc;`)
vm.Run(script)

Compile is referenced in 16 repositories

github.com/robertkrimen/otto github.com/Serulian/compiler github.com/nytlabs/streamtools

...