diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-04-14 20:13:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-04-14 20:13:00 +0800 |
commit | ede808fe32a66ac828762818bf43d18fc343c159 (patch) | |
tree | a4cc8808fff798ea3bfd7103fb56bfb1d74f9c9c /test/basic | |
parent | babe8e194576b0cd2ede04d98417a5f0e2a23647 (diff) | |
download | lua-language-server-ede808fe32a66ac828762818bf43d18fc343c159.zip |
stash
Diffstat (limited to 'test/basic')
-rw-r--r-- | test/basic/linker.lua | 16 | ||||
-rw-r--r-- | test/basic/linker.txt | 16 |
2 files changed, 27 insertions, 5 deletions
diff --git a/test/basic/linker.lua b/test/basic/linker.lua index bf4e50bb..0be93e8d 100644 --- a/test/basic/linker.lua +++ b/test/basic/linker.lua @@ -37,24 +37,28 @@ local function TEST(script) end CARE['id'] = true +CARE['loc'] = true TEST [[ local <?x?> ]] { - id = '9', + id = '9', + loc = true, } TEST [[ local x print(<?x?>) ]] { - id = '7', + id = '7', + loc = true, } TEST [[ local x <?x?> = 1 ]] { - id = '7', + id = '7', + loc = true, } CARE['global'] = true @@ -76,14 +80,16 @@ TEST [[ local x print(x.y.<?z?>) ]] { - id = '7|"y"|"z"', + id = '7|"y"|"z"', + loc = true, } TEST [[ local x function x:<?f?>() end ]] { - id = '7|"f"', + id = '7|"f"', + loc = true, } TEST [[ diff --git a/test/basic/linker.txt b/test/basic/linker.txt new file mode 100644 index 00000000..18176369 --- /dev/null +++ b/test/basic/linker.txt @@ -0,0 +1,16 @@ +ast -> linkers = { + globals = { + ['"X"|"Y"|"Z"'] = {src1, src2, src3}, + ['"X"|"Y"'] = {src4, src5, src6}, + ['"X"'] = {src7, src8, src9}, + }, + locals = { + ['7'] = {src10}, + ['7|"x"'] = {src11}, + }, + tfield = { + ['11|"k"'] = {src12}, + }, +} + + |