mirror of
https://github.com/wader/fq.git
synced 2024-12-29 00:22:38 +03:00
luajit: add to probe group
This commit is contained in:
parent
a83576a83a
commit
93c96965e0
@ -34,12 +34,18 @@ import (
|
||||
//go:embed luajit.md
|
||||
var LuaJITFS embed.FS
|
||||
|
||||
var probeGroup decode.Group
|
||||
|
||||
func init() {
|
||||
interp.RegisterFormat(
|
||||
format.LuaJIT,
|
||||
&decode.Format{
|
||||
Description: "LuaJIT 2.0 bytecode",
|
||||
Groups: []*decode.Group{format.Probe},
|
||||
DecodeFn: LuaJITDecode,
|
||||
Dependencies: []decode.Dependency{
|
||||
{Groups: []*decode.Group{format.Probe}, Out: &probeGroup},
|
||||
},
|
||||
})
|
||||
interp.RegisterFS(LuaJITFS)
|
||||
}
|
||||
|
2
format/luajit/testdata/simple.fqtest
vendored
2
format/luajit/testdata/simple.fqtest
vendored
@ -1,5 +1,5 @@
|
||||
# luajit -b -g example.lua simple.luac
|
||||
$ fq dv -d luajit simple.luac
|
||||
$ fq dv simple.luac
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: simple.luac (luajit) 0x0-0x14e.7 (335)
|
||||
| | | header{}: 0x0-0x17.7 (24)
|
||||
0x000|1b 4c 4a |.LJ | magic: raw bits (valid) 0x0-0x2.7 (3)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# luajit -b -s example.lua simple_stripped.luac
|
||||
$ fq dv -d luajit simple_stripped.luac
|
||||
$ fq dv simple_stripped.luac
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: simple_stripped.luac (luajit) 0x0-0xf9.7 (250)
|
||||
| | | header{}: 0x0-0x4.7 (5)
|
||||
0x00|1b 4c 4a |.LJ | magic: raw bits (valid) 0x0-0x2.7 (3)
|
||||
|
Loading…
Reference in New Issue
Block a user