File: functions.lua

package info (click to toggle)
tree-sitter-lua 0.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 772 kB
  • sloc: ansic: 13,368; javascript: 457; lisp: 229; makefile: 106; python: 102; cpp: 13; sh: 9
file content (37 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local function func_one() end
--             ^ definition.function

func_one()
--  ^ reference.call

local func_two = function() end
--    ^ definition.function

func_two()
--  ^ reference.call

local tbl = {
  func_one = function() end,
  --  ^ definition.function
}

tbl.func_one()
--  ^ reference.call

function tbl.func_two() end
--           ^ definition.function

tbl.func_two()
--  ^ reference.call

function tbl:func_three() end
--           ^ definition.method

tbl:func_three()
--  ^ reference.call

tbl.func_four = function() end
--  ^ definition.function

tbl.func_four()
--  ^ reference.call