Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. var regexpLibrary = []lua.RegistryFunction{
  2. {"match", match},
  3. {"quotemeta", quoteMeta},
  4. {"compile", compile},
  5. }
  6.  
  7. func Open(l *lua.State) {
  8. reOpen := func(l *lua.State) int {
  9. lua.NewLibrary(l, regexpLibrary)
  10. return 1
  11. }
  12. lua.Require(l, "goluago/regexp", reOpen, false)
  13. l.Pop(1)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement