|
6 | 6 | --= Tokenize Lua code or create ASTs (Abstract Syntax Trees) |
7 | 7 | --= and convert the data back to Lua. |
8 | 8 | --= |
9 | | ---= Version: 2.1 (2021-09-03) |
| 9 | +--= Version: 2.1-dev |
10 | 10 | --= |
11 | 11 | --= License: MIT (see the bottom of this file) |
12 | 12 | --= Website: http://luaparser.refreezed.com/ |
@@ -422,7 +422,7 @@ Special number notation rules. |
422 | 422 |
|
423 | 423 | -============================================================]=] |
424 | 424 |
|
425 | | -local PARSER_VERSION = "2.1.0" |
| 425 | +local PARSER_VERSION = "2.1.0-dev" |
426 | 426 |
|
427 | 427 | local NORMALIZE_MINUS_ZERO, HANDLE_ENV |
428 | 428 | do |
@@ -481,7 +481,7 @@ local maybeWrapInt = ( |
481 | 481 | -- have to use mod again. Gah! |
482 | 482 | return tonumber(n % 0x100000000) % 0x100000000 -- 0x100000000 == 2^32 |
483 | 483 | end) |
484 | | - or (_VERSION == "Lua 5.2" and bit32.band) |
| 484 | + or (_VERSION == "Lua 5.2" and require"bit32".band) |
485 | 485 | or function(n) return n end |
486 | 486 | ) |
487 | 487 |
|
@@ -567,7 +567,7 @@ local TOKEN_BYTES = { |
567 | 567 | NAME_START = newCharSet"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_", |
568 | 568 | DASH = newCharSet"-", |
569 | 569 | NUM = newCharSet"0123456789", |
570 | | - NUM_OR_DOT = newCharSet"0123456789.", |
| 570 | + -- NUM_OR_DOT = newCharSet"0123456789.", |
571 | 571 | QUOTE = newCharSet"\"'", |
572 | 572 | SQUARE = newCharSet"[", |
573 | 573 | DOT = newCharSet".", |
|
1158 | 1158 | local BYTES_NAME_START = TOKEN_BYTES.NAME_START |
1159 | 1159 | local BYTES_DASH = TOKEN_BYTES.DASH |
1160 | 1160 | local BYTES_NUM = TOKEN_BYTES.NUM |
1161 | | - local BYTES_NUM_OR_DOT = TOKEN_BYTES.NUM_OR_DOT |
| 1161 | + -- local BYTES_NUM_OR_DOT = TOKEN_BYTES.NUM_OR_DOT |
1162 | 1162 | local BYTES_QUOTE = TOKEN_BYTES.QUOTE |
1163 | 1163 | local BYTES_SQUARE = TOKEN_BYTES.SQUARE |
1164 | 1164 | local BYTES_DOT = TOKEN_BYTES.DOT |
@@ -6449,7 +6449,7 @@ local function valueToAst(v, sortTableKeys) |
6449 | 6449 | local keys = {} |
6450 | 6450 | local indices = {} |
6451 | 6451 |
|
6452 | | - for k, v in pairs(t) do |
| 6452 | + for k in pairs(t) do |
6453 | 6453 | tableInsert(keys, k) |
6454 | 6454 | end |
6455 | 6455 |
|
|
0 commit comments