From a086e4a20d9f3f5db9947a682e1668c04c0c5d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 8 Apr 2022 12:22:06 +0800 Subject: ref includes def --- test/references/common.lua | 66 +++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'test/references/common.lua') 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 = 1 +local <~a~> = 1 = ]] TEST [[ - = 1 -a = +<~a~> = 1 + = ]] TEST [[ local t -t. = 1 -t.a = t. +t.<~a~> = 1 +t. = t. ]] TEST [[ -t. = 1 -t.a = t. +t.<~a~> = 1 +t. = t. ]] TEST [[ :: :: -goto !> +goto <~LABEL~> if true then goto end ]] TEST [[ -:: !> :: +:: <~LABEL~> :: goto if true then goto @@ -38,75 +38,75 @@ end TEST [[ local a = 1 -local = 1 +local <~a~> = 1 = ]] TEST [[ -local +local <~a~> local b = ]] TEST [[ local t = { - = 1 + <~a~> = 1 } print(t.) ]] TEST [[ -t[] = 1 +t[<~'a'~>] = 1 print(t.) ]] TEST [[ local t = { - [] = 1 + [<~'a'~>] = 1 } print(t.) ]] TEST [[ table.() -function table.() +function table.<~dump~>() end ]] TEST [[ local t = {} -t. = 1 +t.<~x~> = 1 t[a.b.c] = 1 ]] TEST [[ local t = {} t.x = 1 -t[a.b.!>] = 1 +t[a.b.<~x~>] = 1 ]] TEST [[ self = { results = { - = {}, + <~labels~> = {}, } } self[self.results.] = lbl ]] TEST [[ -a.b. = 1 +a.b.<~c~> = 1 print(a.b.) ]] TEST [[ -local mt = {} +local = {} function mt:x() - !>:x() + <~self~>:x() end ]] TEST [[ -local = {} +local <~mt~> = {} function :x() self:x() end @@ -114,38 +114,38 @@ end TEST [[ local mt = {} -function mt:x() - self:!>() +function mt:() + self:<~x~>() end ]] TEST [[ local mt = {} -function mt:() +function mt:<~x~>() self:() end ]] TEST [[ a..c = 1 -print(a.!>.c) +print(a.<~b~>.c) ]] TEST [[ -_G. = 1 +_G.<~xxx~> = 1 print() ]] TEST [[ ----@class +---@class <~Class~> ---@type ---@type ]] TEST [[ ---@class Class -local +local <~t~> ---@type Class local x ]] @@ -154,12 +154,12 @@ TEST [[ ---@class Class local t ---@type Class -local +local <~x~> ]] -- BUG TEST [[ ----@return !> +---@return <~xxx~> function f() end ]] @@ -168,7 +168,7 @@ TEST [[ ---@class B: A ---@type A -local +local <~t~> ]] --TEST [[ @@ -181,6 +181,6 @@ local -----@type A --local c -- ---b. = 1 +--b.<~x~> = 1 --c. = 1 --]] -- cgit v1.2.3