1234567891011121314151617181920212223 |
- package mjs
- import (
- "github.com/dop251/goja"
- )
- func initProgram(name, content string, modified int64, engine *Mjs) *jsProgram {
- prog, err := goja.Compile(name, content, true)
- return &jsProgram{
- name: name,
- prog: prog,
- modified: modified,
- compileErr: err,
- }
- }
- type jsProgram struct {
- name string
- prog *goja.Program
- modified int64
- engine *Mjs
- compileErr error
- }
|