diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-08 12:22:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-08 12:22:06 +0800 |
commit | a086e4a20d9f3f5db9947a682e1668c04c0c5d1b (patch) | |
tree | 7d203734c613dbe95b05d353dcb4acfc28f9657c /test/references/common.lua | |
parent | 5a8568991fe3d8570ec0d76dd7314d7f26b8b32b (diff) | |
download | lua-language-server-a086e4a20d9f3f5db9947a682e1668c04c0c5d1b.zip |
ref includes def
Diffstat (limited to 'test/references/common.lua')
-rw-r--r-- | test/references/common.lua | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/test/references/common.lua b/test/references/common.lua index 74ce391a..5217200d 100644 --- a/test/references/common.lua +++ b/test/references/common.lua @@ -1,35 +1,35 @@ local config = require "config" TEST [[ -local <?a?> = 1 +local <~a~> = 1 <!a!> = <!a!> ]] TEST [[ -<?a?> = 1 -a = <!a!> +<~a~> = 1 +<!a!> = <!a!> ]] TEST [[ local t -t.<?a?> = 1 -t.a = t.<!a!> +t.<~a~> = 1 +t.<!a!> = t.<!a!> ]] TEST [[ -t.<?a?> = 1 -t.a = t.<!a!> +t.<~a~> = 1 +t.<!a!> = t.<!a!> ]] TEST [[ :: <!LABEL!> :: -goto <!<?LABEL?>!> +goto <~LABEL~> if true then goto <!LABEL!> end ]] TEST [[ -:: <!<?LABEL?>!> :: +:: <~LABEL~> :: goto <!LABEL!> if true then goto <!LABEL!> @@ -38,75 +38,75 @@ end TEST [[ local a = 1 -local <?a?> = 1 +local <~a~> = 1 <!a!> = <!a!> ]] TEST [[ -local <?a?> +local <~a~> local b = <!a!> ]] TEST [[ local t = { - <?a?> = 1 + <~a~> = 1 } print(t.<!a!>) ]] TEST [[ -t[<?'a'?>] = 1 +t[<~'a'~>] = 1 print(t.<!a!>) ]] TEST [[ local t = { - [<?'a'?>] = 1 + [<~'a'~>] = 1 } print(t.<!a!>) ]] TEST [[ table.<!dump!>() -function table.<?dump?>() +function table.<~dump~>() end ]] TEST [[ local t = {} -t.<?x?> = 1 +t.<~x~> = 1 t[a.b.c] = 1 ]] TEST [[ local t = {} t.x = 1 -t[a.b.<!<?x?>!>] = 1 +t[a.b.<~x~>] = 1 ]] TEST [[ self = { results = { - <?labels?> = {}, + <~labels~> = {}, } } self[self.results.<!labels!>] = lbl ]] TEST [[ -a.b.<?c?> = 1 +a.b.<~c~> = 1 print(a.b.<!c!>) ]] TEST [[ -local mt = {} +local <!mt!> = {} function mt:x() - <!<?self?>!>:x() + <~self~>:x() end ]] TEST [[ -local <?mt?> = {} +local <~mt~> = {} function <!mt!>:x() self:x() end @@ -114,38 +114,38 @@ end TEST [[ local mt = {} -function mt:x() - self:<!<?x?>!>() +function mt:<!x!>() + self:<~x~>() end ]] TEST [[ local mt = {} -function mt:<?x?>() +function mt:<~x~>() self:<!x!>() end ]] TEST [[ a.<!b!>.c = 1 -print(a.<!<?b?>!>.c) +print(a.<~b~>.c) ]] TEST [[ -_G.<?xxx?> = 1 +_G.<~xxx~> = 1 print(<!xxx!>) ]] TEST [[ ----@class <?Class?> +---@class <~Class~> ---@type <!Class!> ---@type <!Class!> ]] TEST [[ ---@class Class -local <?t?> +local <~t~> ---@type Class local x ]] @@ -154,12 +154,12 @@ TEST [[ ---@class Class local t ---@type Class -local <?x?> +local <~x~> ]] -- BUG TEST [[ ----@return <!<?xxx?>!> +---@return <~xxx~> function f() end ]] @@ -168,7 +168,7 @@ TEST [[ ---@class B: A ---@type A -local <?t?> +local <~t~> ]] --TEST [[ @@ -181,6 +181,6 @@ local <?t?> -----@type A --local c -- ---b.<?x?> = 1 +--b.<~x~> = 1 --c.<!x!> = 1 --]] |