Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶ added in v0.14.0
func Call( ctx context.Context, main *compiler.Code, functionName string, args []object.Object, options ...Option, ) (object.Object, error)
Call evaluates the precompiled code and then calls the named function. The supplied arguments are passed in the function call. The result of the function call is returned.
Types ¶
type Option ¶
type Option func(*cfg.RisorConfig)
Option describes a function used to configure a Risor evaluation.
func WithGlobal ¶ added in v0.14.0
WithGlobal supplies a single named global variable to the Risor evaluation.
func WithGlobals ¶ added in v0.14.0
WithGlobals provides global variables that are made available to Risor evaluations. This option is additive, so multiple WithGlobals options may be supplied. If the same key is supplied multiple times, the last supplied value is used.
func WithImporter ¶
WithImporter supplies an Importer that will be used to execute import statements.
func WithLocalImporter ¶ added in v0.8.0
WithLocalImporter enables importing Risor modules from the given directory.
func WithoutDefaultGlobals ¶ added in v0.14.0
func WithoutDefaultGlobals() Option
WithoutDefaultGlobals opts out of all default global builtins and modules.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ast defines abstract syntax tree types that represent Risor code.
|
Package ast defines abstract syntax tree types that represent Risor code. |
|
Package builtins defines the default set of builtin functions for Risor.
|
Package builtins defines the default set of builtin functions for Risor. |
|
cmd
|
|
|
risor
command
|
|
|
risor-api
command
|
|
|
risor-lambda
command
|
|
|
risor-lsp
command
This package implements a Risor language server.
|
This package implements a Risor language server. |
|
risor-docs
module
|
|
|
risor-modgen
module
|
|
|
Package compiler is used to compile an Abstract Syntax Tree (AST) into its corresponding bytecode.
|
Package compiler is used to compile an Abstract Syntax Tree (AST) into its corresponding bytecode. |
|
examples
|
|
|
go/struct
command
|
|
|
internal
|
|
|
tmpl
Package tmpl is used to parse Risor string templates.
|
Package tmpl is used to parse Risor string templates. |
|
Package lexer contains the code to lex input programs into a stream of tokens.
|
Package lexer contains the code to lex input programs into a stream of tokens. |
|
modules
|
|
|
bcrypt
module
|
|
|
carbon
module
|
|
|
cli
module
|
|
|
color
module
|
|
|
echarts
module
|
|
|
gha
module
|
|
|
github
module
|
|
|
goquery
module
|
|
|
htmltomarkdown
module
|
|
|
isatty
module
|
|
|
jmespath
module
|
|
|
kubernetes
module
|
|
|
playwright
module
|
|
|
qrcode
module
|
|
|
redis
module
|
|
|
sched
module
|
|
|
semver
module
|
|
|
shlex
module
|
|
|
slack
module
|
|
|
sql
module
|
|
|
ssh
module
|
|
|
tablewriter
module
|
|
|
template
module
|
|
|
vault
module
|
|
|
yaml
module
|
|
|
Package object defines the standard set of object types in Risor.
|
Package object defines the standard set of object types in Risor. |
|
Package op defines the opcodes that are used in the Risor virtual machine.
|
Package op defines the opcodes that are used in the Risor virtual machine. |
|
Package parser is used to parse an input program from its tokens and produce an abstract syntax tree (AST) as output.
|
Package parser is used to parse an input program from its tokens and produce an abstract syntax tree (AST) as output. |
|
Package repl implements a read-eval-print-loop for Risor.
|
Package repl implements a read-eval-print-loop for Risor. |
|
tests
|
|
|
benchmark
command
|
|
|
Package token defines the tokens that are produced when lexing Risor code.
|
Package token defines the tokens that are produced when lexing Risor code. |