Skip to content

Commit

Permalink
luajit: add luajit.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dlatchx committed Jun 20, 2023
1 parent 715f850 commit bdf158b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions format/luajit/luajit.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package luajit

import (
"bytes"
"embed"
"encoding/binary"

"github.com/wader/fq/format"
Expand All @@ -30,13 +31,17 @@ import (
"github.com/wader/fq/pkg/scalar"
)

//go:embed luajit.md
var LuaJITFS embed.FS

func init() {
interp.RegisterFormat(
format.LuaJIT,
&decode.Format{
Description: "LuaJIT 2.0 bytecode dump",
DecodeFn: LuaJITDecode,
})
interp.RegisterFS(LuaJITFS)
}

// reinterpret an int as a float
Expand Down
6 changes: 6 additions & 0 deletions format/luajit/luajit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Authors
- [@dlatchx](https://github.com/dlatchx)

### References
- https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_bcdump.h
- http://scm.zoomquiet.top/data/20131216145900/index.html

0 comments on commit bdf158b

Please sign in to comment.