diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/linescanner.lua | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/tests/linescanner.lua b/tests/linescanner.lua index 3c62f8c..6287850 100644 --- a/tests/linescanner.lua +++ b/tests/linescanner.lua @@ -244,11 +244,11 @@ local function f() end + local x - local x, y - local x = - -1 + +1 ? local x, y = - 2, 3 + local x, y = 2, + -3 + +3 ? ]] test [[ @@ -274,6 +274,39 @@ local t = { + } ? ]=] +-- Single expressions in tables and calls. +test [=[ +local x = { + + 1, ? + 2 ? +} ? +local y = { + + 3, ? + id ? +} ? +local z = { + + "" ? +} ? +local a = f( + + true ? +) ? +local b = { + + id[1] ? +} ? +local c = { + + id.abcd ? +} ? +local d = { + + id.k1.k2 + +} ? +local e = { + + {} ? +} ? +local f = { + + {foo} + +} ? +]=] + -- Hanging table endings. test [[ local v = f({ + |