local config = require "config" TEST [[ local function _(x) end function _() () end ]] TEST [[ function _() do return end () end ]] TEST [[ local function a:b() a:b() () end ]] --TEST [[ --function _(...) -- function _() -- print() -- end --end --]] TEST [[ local ( / b)() ]] TEST [[ local io.load(root / .source / 'API' / path) ]] TEST [[ obj[#+1] = {} ]] TEST [[ self = { results = { = {}, } } self[self.results.] = lbl ]] TEST [[ self.results = { = {}, } self[self.results.] = lbl ]] TEST [[ self.results. = {} self[self.results.] = lbl ]] TEST [[ local mt = {} function mt:() end mt:x() mt:() ]] TEST [[ local function func() x = { xx(), , } end ]] TEST [[ local local t = { ..., , } ]] TEST [[ local a local return f(), ]] TEST [[ local a = os.clock() local ?> = os.clock() ]] TEST [[ local mt = {} function mt:(a, b) end local function init() return mt end local t = init() t:() ]] TEST [[ local mt = {} mt.__index = mt function mt:(a, b) end local function init() return setmetatable({}, mt) end local t = init() t:() ]] TEST [[ local t = {} t.f1 = 1 t. = t.f1 print(t.) ]] TEST [[ local t = {} t.f1 = 1 t. = t.f1 t.f1 = t.f2 print(t.) ]] TEST [[ ---@type string string.xx = '' string.xx:() ]] --TEST [[ -----@class Foo --Foo = {} --function Foo:Constructor() -- self. = 1 --end -- -----@class Foo2: Foo --Foo2 = {} --function Foo2:Constructor() --end -- -----@type Foo2 --local v --v. --]] TEST [[ local A, B function A:get1() local a = B:get() return a end function A:get2() local a = B:get() return a end function A:get3() local a = B:get() return a end function A:get4() local a = B:get() return a end function A:get5() local a = B:get() return a end function A:get6() local a = B:get() return a end function A:get7() local a = B:get() return a end function A:get8() local a = B:get() return a end function B:get() local b b = A:get1() b = A:get2() b = A:get3() b = A:get4() b = A:get5() b = A:get6() b = A:get7() b = A:get8() return b end local = B:get() print() ]] TEST [[ g[a.b.c] = 1 print(g.) ]] TEST [[ local function f() return '' end local ?> = '' ]] TEST [[ local t, a local = t[a] t[a] = ]] TEST [[ ---@class A ---@field x number ---@class B: A ---@field boolean ---@type B local t local !> = t.x ]] TEST [[ ---@class A ---@field number ---@class B: A ---@type B local t local !> = t.x ]] TEST [[ ---@class A local A function A:x() end ---@class B: A local B function B:() end ---@type B local t local !> = t.x ]] TEST [[ ---@class A local A function A:() end ---@class B: A local B ---@type B local t local !> = t.x ]] -- TODO --TEST [[ -----@class A --local A -- -----@return A --function A:x() end -- -----@class B: A --local -- -----@return B --function B:x() end -- -----@type B --local t -- --local !> = t.x() --]]