summary refs log tree commit diff stats
path: root/test.lua
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2019-04-06 11:25:44 -0300
committerSoniEx2 <endermoneymod@gmail.com>2019-04-06 11:25:44 -0300
commita6372171c08b21adfc1c9879bd195fcd6a658d18 (patch)
treee18c1cd71c8ab41ae4ce34ec5cdd12df42f11ff8 /test.lua
parent5a4b41bd47d999619b0b51052ae99157ac491a01 (diff)
It's working better now...
Diffstat (limited to 'test.lua')
-rw-r--r--test.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test.lua b/test.lua
index 1290c97..076d1e8 100644
--- a/test.lua
+++ b/test.lua
@@ -100,6 +100,12 @@ do -- more lua tokens
     else
         for i,v in ipairs(state) do
             print(case, i, v)
+            if v == luatokens.TK_STRING then
+                in_string = true
+            elseif in_string then
+                print(case, v:gsub(".", function(v) return "\\"..string.byte(v) end))
+                in_string = false
+            end
         end
     end
     print(case, "---- OUT TOKENS ----")