Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var regexpLibrary = []lua.RegistryFunction{
- {"match", match},
- {"quotemeta", quoteMeta},
- {"compile", compile},
- }
- func Open(l *lua.State) {
- reOpen := func(l *lua.State) int {
- lua.NewLibrary(l, regexpLibrary)
- return 1
- }
- lua.Require(l, "goluago/regexp", reOpen, false)
- l.Pop(1)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement