summaryrefslogtreecommitdiff
path: root/src/llex.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-10-09 07:49:20 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-11-09 12:56:17 +0100
commit97a52383d4194678b781e8826c6512fc6fe40288 (patch)
tree1ddc466da9adde4e2025cddd591ad85e0b3ff0ac /src/llex.js
parenta5d5b5f695ad557e25911f08be2d132ab1be658c (diff)
downloadfengari-97a52383d4194678b781e8826c6512fc6fe40288.tar.gz
fengari-97a52383d4194678b781e8826c6512fc6fe40288.tar.bz2
fengari-97a52383d4194678b781e8826c6512fc6fe40288.zip
Removed incorrect use of llimits.MAX/MIN_INT
llimit.js is renamed to llimits.js
Diffstat (limited to 'src/llex.js')
-rw-r--r--src/llex.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/llex.js b/src/llex.js
index dc0b382..a20f308 100644
--- a/src/llex.js
+++ b/src/llex.js
@@ -9,7 +9,7 @@ const ljstype = require('./ljstype.js');
const lobject = require('./lobject.js');
const lstring = require('./lstring.js');
const ltable = require('./ltable.js');
-const llimit = require('./llimit.js');
+const llimits = require('./llimits.js');
const lzio = require('./lzio.js');
const TS = defs.thread_status;
const char = defs.char;
@@ -108,7 +108,7 @@ class LexState {
const save = function(ls, c) {
let b = ls.buff;
if (b.n + 1 > b.buffer.length) {
- if (b.buffer.length >= llimit.MAX_INT/2)
+ if (b.buffer.length >= llimits.MAX_INT/2)
lexerror(ls, defs.to_luastring("lexical element too long", true), 0);
}
b.buffer[b.n++] = c < 0 ? 255 + c + 1 : c;
@@ -169,7 +169,7 @@ const inclinenumber = function(ls) {
next(ls); /* skip '\n' or '\r' */
if (currIsNewline(ls) && ls.current !== old)
next(ls); /* skip '\n\r' or '\r\n' */
- if (++ls.linenumber >= llimit.MAX_INT)
+ if (++ls.linenumber >= llimits.MAX_INT)
lexerror(ls, defs.to_luastring("chunk has too many lines", true), 0);
};