Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCompileFailed = errors.New("failed to compile risor script") ErrContentNil = errors.New("risor content is nil") )
Functions ¶
func Compile ¶
func Compile(scriptContent *string, options ...risorCompiler.Option) (*risorCompiler.Code, error)
Compile parses and compiles the script content into bytecode
func CompileWithGlobals ¶
func CompileWithGlobals(scriptContent *string, globals []string) (*risorCompiler.Code, error)
CompileWithGlobals parses and compiles the script content into bytecode, with custom global names which are needed when parsing a script that will eventually have globals injected at eval time. For example, if a script uses a request or response object, it needs to be compiled with those global names, even though they won't be available until eval time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.