diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-01 11:51:00 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-01 11:51:00 +0100 |
commit | 444182dbbb18f44cf7cafc378f092c28006be365 (patch) | |
tree | a7d539ec3698c113c6cb68697bd3ec6f39b499e0 /src/llex.js | |
parent | ae8b95ee9c3871f506b20c74367fdc9e8cb098e2 (diff) | |
download | fengari-444182dbbb18f44cf7cafc378f092c28006be365.tar.gz fengari-444182dbbb18f44cf7cafc378f092c28006be365.tar.bz2 fengari-444182dbbb18f44cf7cafc378f092c28006be365.zip |
Loading tests (binary/text)
Diffstat (limited to 'src/llex.js')
-rw-r--r-- | src/llex.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llex.js b/src/llex.js index 73cda58..63a1fbb 100644 --- a/src/llex.js +++ b/src/llex.js @@ -453,7 +453,7 @@ const read_string = function(ls, del, seminfo) { } } save_and_next(ls); /* skip delimiter */ - seminfo.ts = new TValue(CT.LUA_TLNGSTR, ls.buff.buffer.slice(1).join('')); + seminfo.ts = new TValue(CT.LUA_TLNGSTR, ls.buff.buffer.slice(1, ls.buff.buffer.length-1).join('')); }; const isreserved = function(w) { @@ -566,7 +566,7 @@ const llex = function(ls, seminfo) { let ts = new TValue(CT.LUA_TLNGSTR, ls.buff.buffer.join('')); seminfo.ts = ts; - let kidx = luaX_tokens.slice(0, 22).indexOf(ts.value) + let kidx = luaX_tokens.slice(0, 22).indexOf(ts.value); if (kidx >= 0) /* reserved word? */ return kidx + FIRST_RESERVED; else |