Enyby
ef8175050b
Remove unused field.
2019-10-21 23:26:10 +03:00
Enyby
0d2aa6cc54
Switch little-endian by default as original Lua does.
2019-10-21 23:25:30 +03:00
Enyby
fe7bd07450
Fix lexer bugs.
...
Wrong work with spaces.
2019-10-21 10:20:06 +03:00
Enyby
f0e9348ae2
Fix lexer bugs.
...
Already handled by inside isalnum.
2019-10-21 10:17:26 +03:00
Enyby
22e7a8c620
Fix lexer bugs.
...
Already handled by case above.
2019-10-21 10:16:43 +03:00
Enyby
c8461b8128
Fix pattern classes in string lib.
...
```
local ref = {
}
for cl in string.gmatch('acdglpsuwxACDGLPSUWX', '.') do
local list = ''
for i = 0, 255 do
if string.match(string.char(i), '%'..cl) then
list = list..i..','
end
end
if ref[cl] then
assert(ref[cl] == list, cl..':\n'..list..'\n'..ref[cl])
else
print(cl..' = "'..list..'",')
end
end
print('+')
```
2019-10-21 08:43:53 +03:00
Enyby
3a6c382570
Fix 'error' call. #60
2019-10-20 19:19:14 +03:00
Enyby
4db34780b7
Fix build error.
2019-10-20 18:43:10 +03:00
Enyby
ac3475deee
Improved error messages for lib functions.
2019-10-20 07:19:34 +03:00
Enyby
af35c4d89e
Improve error messages for base lib.
2019-10-20 07:17:46 +03:00
Enyby
c71f277697
Improve error messages for lib table.
2019-10-20 07:07:17 +03:00
Enyby
5fe0a3950d
Improve get name for func.
2019-10-20 06:45:53 +03:00
Enyby
169202362e
Fix error message for collectgarbage invalid option.
2019-10-20 00:34:54 +03:00
Enyby
5609d8c92b
Add check mode for io.open. #57
2019-10-19 20:53:56 +03:00
Enyby
dbab0aed01
Fix odd varargs methods.
2019-10-14 18:33:25 +03:00
Enyby
f8d7731b56
Fix NPE on getobjname in some cases.
2019-10-14 14:12:08 +03:00
Enyby
2f5aa594bd
Fix getobjname for get constant name if it stored on register.
2019-10-14 14:11:38 +03:00
Enyby
edfe1a5fde
Add check for io.popen modes.
2019-10-13 06:16:21 +03:00
Enyby
6efb6f000e
Improve error message for file:seek and file:setvbuf.
2019-10-13 05:58:32 +03:00
Enyby
f3b8a1eddc
Fix default setvbuf size.
2019-10-12 19:12:44 +03:00
Enyby
20eca5760d
Fix detect io lib read modes like file:read('*all').
2019-10-12 17:57:37 +03:00
Enyby
3613bc0862
Add check for values passed to file:vsetbuf and file:seek.
2019-10-12 17:51:04 +03:00
Enyby
6985980572
Merge branch 'master' of https://github.com/luaj/luaj
2019-10-12 16:09:03 +03:00
Enyby
60d130cecc
Fix corrupted args for io.lines and file:lines on reuse stack elements.
2019-10-12 16:08:36 +03:00
Enyby
b705eb05f4
Merge pull request #59 from Mikhael-Danilov/patch-1
...
Fix link
2019-10-07 21:53:17 +03:00
Mikhael-Danilov
d0bb0409a3
Fix link
...
Fix link to examples/android/src/android/LuajViewLuajView.java
2019-10-07 20:23:45 +03:00
Enyby
db58e1808b
Fix load script from func.
2019-10-07 18:08:47 +03:00
Enyby
e2ede7f91c
Fix call io.lines(nil, ...).
2019-10-07 17:11:13 +03:00
Enyby
a50deaa75c
Fix raise error from io.lines and file:lines.
2019-10-07 14:52:12 +03:00
Enyby
f9f78b81da
Allow read zero bytes in io lib methods.
2019-10-07 14:26:21 +03:00
Enyby
984fa30bf6
Fix read all stdin in JSE.
2019-10-07 00:25:07 +03:00
Enyby
65beda4c2b
Fix read all at EOF.
2019-10-07 00:23:34 +03:00
Enyby
934a8fc57b
Fix io.read(0) on EOF.
2019-10-06 23:49:04 +03:00
Enyby
832ec739ea
Close not closed file on GC. #55
...
Relevant only for J2SE, not for J2ME.
2019-10-06 23:35:45 +03:00
Enyby
8345bee6b4
Fix io.lines and file:lines do not honor additional params. #52
...
Fix io.lines do not close file on EOF. #53
Improve error message for io.lines and file:lines on closed file.
2019-10-06 19:09:01 +03:00
Enyby
83f2e1d96a
Fix io.read and file:read do not support '*L' format. #54
2019-10-06 18:53:15 +03:00
Enyby
14745ba76a
Fix call io.read, file:read without params.
2019-10-06 18:40:31 +03:00
Enyby
c62ba1f22e
File tostring respect closed.
2019-10-06 16:54:44 +03:00
Enyby
868928779f
Fix rewrite io.input inside io.lines.
...
```
do
local t = os.tmpname()
local f = io.open(t, 'w')
f:write('test')
f:close()
local i = io.input()
for l in io.lines(t) do end
local n = io.input()
assert(n == i, tostring(n).." ~= "..tostring(i))
os.remove(t)
print('+')
end
```
2019-10-06 16:43:11 +03:00
Enyby
f383c27728
We not in C anymore.
2019-09-23 01:54:27 +03:00
Enyby
e7b11110a3
Raise lexerror if failed parse number as double.
2019-09-23 01:53:01 +03:00
Enyby
0fa27c3783
EOZ (-1) not a space char.
...
Fix bug with endless loop at not ended \z sequence.
```
local function lexerror (s, err)
local st, msg = load('return ' .. s, '')
if err ~= '<eof>' then err = err .. "'" end
assert(not st and string.find(msg, "near .-" .. err))
end
lexerror("'alo \\z \n\n", "<eof>")
```
2019-09-23 00:39:42 +03:00
Enyby
72a71e5a65
Merge branch 'master' of https://github.com/luaj/luaj
2019-09-21 07:18:37 +03:00
Enyby
6031d6b479
Fix lua error message on bad arg for 'load'.
2019-09-21 07:18:08 +03:00
Enyby
c1834733c1
Merge pull request #45 from zaoqi/patch-1
...
readme: fix typo
2019-08-10 02:18:32 +03:00
Zaoqi
10f88d2c31
readme: fix typo
2019-08-09 21:44:25 +08:00
Enyby
6d2deb4cb6
Fix use function as source for load call.
2019-08-05 04:07:09 +03:00
Enyby
5f52729fc9
Fix OP_JMP description.
2019-07-15 05:29:37 +03:00
Enyby
e6736857b6
Add support for OP_LOADKX. #43
2019-06-30 22:18:19 +03:00
Enyby
5c5176727a
Merge branch 'master' of https://github.com/luaj/luaj
2019-05-05 17:23:27 +03:00