diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-02 14:27:05 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-02 15:23:06 +0100 |
commit | bad73671ca959f292becb8c68b73a14380aeeb56 (patch) | |
tree | 8bc5f0a94fabd3af0c7502c6c6d25ffc5f4e1eac /sandbox | |
parent | 04a7b7322446eae0f5da66bedc1e262a7d83419d (diff) | |
download | fengari-bad73671ca959f292becb8c68b73a14380aeeb56.tar.gz fengari-bad73671ca959f292becb8c68b73a14380aeeb56.tar.bz2 fengari-bad73671ca959f292becb8c68b73a14380aeeb56.zip |
readFunction, readCode, readString, readInstruction
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/hello.bc | bin | 0 -> 192 bytes | |||
-rw-r--r-- | sandbox/hello.js | 8 | ||||
-rw-r--r-- | sandbox/hello.lua | 2 | ||||
-rw-r--r-- | sandbox/hello2.lua | 7 |
4 files changed, 17 insertions, 0 deletions
diff --git a/sandbox/hello.bc b/sandbox/hello.bc Binary files differnew file mode 100644 index 0000000..25258bb --- /dev/null +++ b/sandbox/hello.bc diff --git a/sandbox/hello.js b/sandbox/hello.js new file mode 100644 index 0000000..f8f6e15 --- /dev/null +++ b/sandbox/hello.js @@ -0,0 +1,8 @@ +const DataView = require('buffer-dataview'); +const fs = require('fs'); + +const BytecodeParser = require("../src/lundump.js"); +const lua_State = require('../src/lstate.js').lua_State; + +let p = new BytecodeParser(new lua_State(), new DataView(fs.readFileSync("./sandbox/hello.bc"))) +p.luaU_undump();
\ No newline at end of file diff --git a/sandbox/hello.lua b/sandbox/hello.lua new file mode 100644 index 0000000..b2bf135 --- /dev/null +++ b/sandbox/hello.lua @@ -0,0 +1,2 @@ +local hello = "Hello" +print (hello.." World!") diff --git a/sandbox/hello2.lua b/sandbox/hello2.lua new file mode 100644 index 0000000..bcbc1e0 --- /dev/null +++ b/sandbox/hello2.lua @@ -0,0 +1,7 @@ +local a = 1; +local b = 2; +print(a, b); + +function c(a, b) + return a + b +end
\ No newline at end of file |