gamax92
5026b5ac1e
string.format fixes
...
Fix string.format's floating point implementation
Disable space if explicitPlus is set
Disable leftAdjust and zeroPad if no width is specified
precision gets set to zero if only a dot is specified
Add support for %a/A, Lua can use these and Java happens to support it
2019-08-11 12:50:29 +02:00
asie
6ba28727d2
move doubleToRawLongBits (not present on JME) to JSE class
2019-08-11 12:49:56 +02:00
gamax92
0707e71c6c
Support __pairs and __ipairs
...
Added PAIRS and IPAIRS constants to LuaValue
Merged pairs and ipairs into one class with a dynamic constructor, this
is similar to Lua's pairsmeta function.
Check for and call it's specific metamethod if it's available.
2019-08-11 12:14:21 +02:00
gamax92
43f937470f
Fix classes based on LibFunction giving "value" for their error message.
2019-08-11 12:11:40 +02:00
gamax92
5d3f2eb72c
LuaClosure: Add the colon after line numbers to error messages
2019-08-11 12:11:31 +02:00
gamax92
244eb4b1a1
StringLib: Support seperators in string.rep
2019-08-11 12:07:47 +02:00
gamax92
626664a0fe
BaseLib: fix handling of __tostring
2019-08-11 12:05:48 +02:00
gamax92
2bccb4670e
LuaValue: add 0x to tojstring() to match Lua
2019-08-11 12:01:51 +02:00
gamax92
89acb5bcb5
LuaString: port strx2number for accurate double scanning, handle plus signs when converting strings to numbers
2019-08-11 11:59:49 +02:00
gamax92
c69585332b
LexState: rename TK_EOS and <eos> to TK_EOF and <eof> to match Lua
2019-08-11 11:55:42 +02:00
gamax92
c9fa0f27c7
LuaValue, FuncState: correct error messages to match Lua
2019-08-11 11:50:42 +02:00
asie
af4cfe5e00
LuaDouble: handle negative zero, negative NaN
2019-08-11 11:47:51 +02: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
Enyby
7721380e20
Fix NPE on error. #40
2019-05-05 17:22:24 +03:00
Enyby
16aa199d40
Add debug info to build.
2019-05-05 17:21:25 +03:00
Enyby
177fe4e09f
Fix path to build files in Readme.md
2019-03-17 03:12:52 +02:00
Enyby
a7c8a408ce
Fix build bug. #33
2019-03-17 03:06:05 +02:00
Enyby
84b0dd171e
Fix error messages for pass tests.
2019-03-09 23:35:22 +02:00
Enyby
898208365d
Fix print for pass tests.
2019-03-09 23:18:47 +02:00
Enyby
ffb686556f
Fix loadlib.
2019-03-09 23:00:28 +02:00
Enyby
6694c375c9
Fix build errors for j2me. #32
v3.0.2
2019-03-09 17:38:32 +02:00
Enyby
e70eb5edc2
Fix build bug. #32
2019-03-09 15:49:56 +02:00
Enyby
9688d3c5fc
Remove libs dependency from PackageLib.
2019-01-13 19:23:44 +02:00
Enyby
6f5af581e8
Fix string.gsub for invalid use '%' in replacement string
...
Check code:
```
print(pcall(load('string.gsub("test", "%S", "A%")')))
print(pcall(load('string.gsub("test", "%S", "%A")')))
```
2019-01-03 18:09:00 +02:00
Enyby
870aee2cae
Improved opt methods for numbers in LuaString
2018-12-29 19:49:43 +02:00
Enyby
c2ec9edf39
Deny use NaN as index in rawset.
2018-12-24 22:34:49 +02:00
Enyby
cfb3aaca61
Fix math.min and math.max.
...
Now similar to native Lua and reference: `Returns the argument with the maximum value, according to the Lua operator <. (integer/float) `
2018-12-24 20:52:23 +02:00
Enyby
4105cebf1e
Fix math.fmod for int values.
2018-12-24 20:37:39 +02:00
Enyby
339f004eb7
More compat with lua tests.
2018-12-24 19:30:11 +02:00
Enyby
05a604645d
Fix modulo for edge cases.
...
Reference code:
```
for i,lhs in ipairs({-math.huge, -10.0, 0.0, 10.0, math.huge}) do
for j,rhs in ipairs({-math.huge, -10.0, 0.0, 10.0, math.huge}) do
print(lhs, rhs, lhs % rhs)
end
end
```
2018-12-24 18:30:35 +02:00
Enyby
63ead7aac7
Fix string.format for long integers.
2018-12-24 11:45:06 +02:00
Enyby
c9ba2d4bb1
Fix math.modf for inf/-inf and int values.
2018-12-23 17:48:31 +02:00
Enyby
92cee0812d
Fix JSE math.log for second arg.
2018-12-23 17:06:34 +02:00
Enyby
e61e5694fa
Fix string.match for empty pattern
2018-12-16 06:38:23 +02:00
Enyby
47f8d6e6fc
Fix a frontier pattern match
...
We're not in C anymore. LuaString are not null terminated.
Also need quotes in error messages.
2018-12-11 23:44:39 +02:00
Enyby
14ac4bb7f9
Merge pull request #21 from lorenzos/patch-1
...
Check the type before reusing a NumberValueEntry
2018-11-02 23:11:36 +02:00
Lorenzo Stanco
b8aaaafb68
Check the type before reusing a NumberValueEntry
...
Fixes #20
2018-10-31 15:57:02 +01:00
Enyby
88a557033b
Optimize get new stack for calls.
2018-09-20 20:14:02 +03:00
Enyby
24a8559ceb
Fix make LuaString from copy.
2018-09-17 16:32:09 +03:00
Enyby
028e03e4bc
Avoid synthetic methods
2018-09-16 18:49:26 +03:00
Enyby
5c1f7d2ab2
Make const final
2018-09-16 18:45:52 +03:00
Enyby
9db1254160
Avoid synthetic methods
2018-09-16 18:44:36 +03:00
Enyby
f899c709ff
Remove unused var.
2018-09-16 18:43:39 +03:00
Enyby
9c9e193cc4
Make consts final.
2018-09-16 18:40:06 +03:00
Enyby
e9db487d97
Improve convert function to string.
2018-09-16 18:38:49 +03:00