summary refs log tree commit diff stats
path: root/src/cratera/luatokens.lua
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2024-06-19 23:44:42 -0300
committerSoniEx2 <endermoneymod@gmail.com>2024-06-19 23:48:25 -0300
commit13ba6740870d99749f0341b5a38e1e9213162647 (patch)
tree860aa0171f97ca97a6fa9d7bffa04db39d85ae3b /src/cratera/luatokens.lua
parent70a7abacbb36783fb77025814242faf32a6c8a47 (diff)
Tokenize numbers as strings
"Fixes" Lua 5.2 support, but makes certain number formats non-portable,
for example hex floats will not work before Lua 5.3.
Diffstat (limited to 'src/cratera/luatokens.lua')
-rw-r--r--src/cratera/luatokens.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cratera/luatokens.lua b/src/cratera/luatokens.lua
index 632cf27..6958171 100644
--- a/src/cratera/luatokens.lua
+++ b/src/cratera/luatokens.lua
@@ -641,7 +641,7 @@ defs.in_integer = setmetatable(selfify({
         -- TODO figure out best order for these checks
         if rule == "digit" or token == "." or rule == "hexdigit" or rule == "into_hex" or rule == "exp" then return end
         state[#state+1] = state[STATE].numtype
-        state[#state+1] = tonumber(table.concat(state[COLLECT])) -- TODO maybe not the best option
+        state[#state+1] = table.concat(state[COLLECT]) -- TODO maybe not the best option
         state[COLLECT] = nil
     end,
     numtype = TK_INT