summaryrefslogtreecommitdiff
path: root/src/bytecodeparser.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-02 07:36:14 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-02 07:36:14 +0100
commitfa7ce109418aca2fd60fdb65b4b2451c4854dd09 (patch)
treec6469ea5d437374a7db0980422a18c32d9a6fb61 /src/bytecodeparser.js
parentebeb32400b9a2d3e7196887f7021b9bf08770fd9 (diff)
downloadfengari-fa7ce109418aca2fd60fdb65b4b2451c4854dd09.tar.gz
fengari-fa7ce109418aca2fd60fdb65b4b2451c4854dd09.tar.bz2
fengari-fa7ce109418aca2fd60fdb65b4b2451c4854dd09.zip
Following Lua's source code as closely as possible
Diffstat (limited to 'src/bytecodeparser.js')
-rw-r--r--src/bytecodeparser.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/bytecodeparser.js b/src/bytecodeparser.js
deleted file mode 100644
index 595158e..0000000
--- a/src/bytecodeparser.js
+++ /dev/null
@@ -1,28 +0,0 @@
-"use strict";
-
-const DataView = require('buffer-dataview');
-
-/**
- * Parse Lua 5.3 bytecode
- */
-class BytecodeParser {
-
- constructor(dataView) {
- this.dataView = dataView;
- this.offset = 0;
- }
-
- _read(offset, nbytes) {
- let bytes = new Uint8Array(nbytes);
-
- for (let i = 0; i < nbytes; i++)
- bytes[i] = this.dataView.getUint8(offset, true);
-
- return bytes.length === 1 ? bytes[0] : bytes;
- }
-
- readByte() {
- return read(this.offset++, 1);
- }
-
-} \ No newline at end of file