Documentation
¶
Overview ¶
Package mappings some go built in functions to grol functions. Same mechanism can be used to map other go functions to grol functions and further extend the language.
Index ¶
Constants ¶
View Source
const DefaultTrimSet = " \r\n\t"
View Source
const GrolFileExtension = ".gr" // Also the default filename for LoadSaveEmptyOnly.
View Source
const MaxImageDimension = 1024 // in pixels.
TODO: make this configurable and use the slice check as well as some sort of LRU.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init initializes the extensions, can be called multiple time safely but should really be called only once before using GROL repl/eval. If the passed Config pointer is nil, default (safe) values are used.
func MustCreate ¶ added in v0.63.0
Types ¶
type Config ¶ added in v0.41.0
type Config struct { HasLoad bool // load() only present if this is true. HasSave bool // save() only present if this is true. LoadSaveEmptyOnly bool // Restrict load/save to a single .gr file inside the current directory. UnrestrictedIOs bool // Dangerous when true: can overwrite files, read any readable file etc... }
Configure restrictions and features. Currently about IOs of load and save functions.
type GrolImage ¶ added in v0.68.0
type GrolImage struct { Image *image.NRGBA Vect *vector.Rasterizer W, H int }
type OneFloatInOutFunc ¶
Click to show internal directories.
Click to hide internal directories.