Documentation ¶
Overview ¶
Package regexlib is an example of how to make a go library for lua. It allows using Go regular expressions in Lua code. To use in a runtime r, add the following Go code:
regexlib.LibLoader.Run(r)
Then in Lua code e.g.
regex = require"regex" ptn = regex.new("[0-9]+") match = ptn:find("hello there 123 yippee")
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LibLoader = packagelib.Loader{
Load: load,
Name: "regex",
}
LibLoader defines the name of the package and how to load it. Given a runtime r, call:
regexlib.LibLoader.Run(r)
To load the package into the runtime (note that packagelib needs to be loaded first).
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.