diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-30 11:58:09 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-30 14:39:19 +0200 |
commit | 3813f2d43054708bab7221a5ca74a0183a2ebcaf (patch) | |
tree | 2e27bc81114099cbf94b18e2c139843e66db6b53 /src/lua.js | |
parent | 456ab7b69f88859683c60cc2261e70d6dbadd8e8 (diff) | |
download | fengari-3813f2d43054708bab7221a5ca74a0183a2ebcaf.tar.gz fengari-3813f2d43054708bab7221a5ca74a0183a2ebcaf.tar.bz2 fengari-3813f2d43054708bab7221a5ca74a0183a2ebcaf.zip |
8-bit only in lstrlib
Diffstat (limited to 'src/lua.js')
-rw-r--r-- | src/lua.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4,6 +4,12 @@ const assert = require('assert'); const luaconf = require('./luaconf.js'); +// To avoid charCodeAt everywhere +const char = []; +for (let i = 0; i < 127; i++) + char[String.fromCharCode(i)] = i; +module.exports.char = char; + /* mark for precompiled code ('<esc>Lua') */ const LUA_SIGNATURE = "\x1bLua"; |