goja_modules

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIdentifiers

func GetIdentifiers(p *ast.Program) map[string]string

func GetIdentifiers(p *ast.Program) []string {

Types

type JSCode

type JSCode struct {
	// contains filtered or unexported fields
}

to store info on a js prog

func NewJSCode

func NewJSCode(registry *require.Registry, code string) (*JSCode, error)

func (*JSCode) Run

func (js *JSCode) Run(symtab map[string]any, logger *slog.Logger) (val any, err error)

func (*JSCode) SetSymbolTable

func (js *JSCode) SetSymbolTable(symtab map[string]any, logger *slog.Logger)

type LoggerPrinter added in v0.4.2

type LoggerPrinter interface {
	Log(string)
	Debug(string)
	Info(string)
	Warn(string)
	Error(string)
	SetLogger(*slog.Logger)
}

LoggerPrinter is the interface for printing log messages from JavaScript console module

func InitJSRegistry added in v0.4.2

func InitJSRegistry(logger *slog.Logger, func_map map[string]any) (*require.Registry, LoggerPrinter)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL