-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'stevearc:master' into php-method-scope
- Loading branch information
Showing
8 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(function_definition | ||
name: (word) @name | ||
(#set! "kind" "Function")) @symbol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; Functions | ||
(decl_def | ||
(cmd_identifier) @name | ||
(#set! "kind" "Function") | ||
) @symbol | ||
|
||
(decl_def | ||
(val_string) @name | ||
(#offset! @name 0 1 0 -1) | ||
(#set! "kind" "Function") | ||
) @symbol | ||
|
||
; Modules | ||
(decl_module | ||
(cmd_identifier) @name | ||
(#set! "kind" "Module") | ||
) @symbol | ||
|
||
; Constant | ||
(stmt_const | ||
(identifier) @name | ||
(#set! "kind" "Constant") | ||
) @symbol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
[ | ||
{ | ||
"children": [ | ||
{ | ||
"children": [ | ||
{ | ||
"col": 8, | ||
"end_col": 11, | ||
"end_lnum": 6, | ||
"kind": "Function", | ||
"level": 2, | ||
"lnum": 5, | ||
"name": "baz", | ||
"selection_range": { | ||
"col": 17, | ||
"end_col": 20, | ||
"end_lnum": 5, | ||
"lnum": 5 | ||
} | ||
} | ||
], | ||
"col": 4, | ||
"end_col": 7, | ||
"end_lnum": 7, | ||
"kind": "Function", | ||
"level": 1, | ||
"lnum": 4, | ||
"name": "bar", | ||
"selection_range": { | ||
"col": 13, | ||
"end_col": 16, | ||
"end_lnum": 4, | ||
"lnum": 4 | ||
} | ||
} | ||
], | ||
"col": 0, | ||
"end_col": 3, | ||
"end_lnum": 8, | ||
"kind": "Function", | ||
"level": 0, | ||
"lnum": 3, | ||
"name": "foo", | ||
"selection_range": { | ||
"col": 9, | ||
"end_col": 12, | ||
"end_lnum": 3, | ||
"lnum": 3 | ||
} | ||
}, | ||
{ | ||
"col": 0, | ||
"end_col": 3, | ||
"end_lnum": 11, | ||
"kind": "Function", | ||
"level": 0, | ||
"lnum": 10, | ||
"name": "foo1", | ||
"selection_range": { | ||
"col": 9, | ||
"end_col": 13, | ||
"end_lnum": 10, | ||
"lnum": 10 | ||
} | ||
}, | ||
{ | ||
"col": 0, | ||
"end_col": 3, | ||
"end_lnum": 14, | ||
"kind": "Function", | ||
"level": 0, | ||
"lnum": 13, | ||
"name": "foo2", | ||
"selection_range": { | ||
"col": 9, | ||
"end_col": 13, | ||
"end_lnum": 13, | ||
"lnum": 13 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
[ | ||
{ | ||
"children": [ | ||
{ | ||
"col": 2, | ||
"end_col": 32, | ||
"end_lnum": 2, | ||
"kind": "Constant", | ||
"level": 1, | ||
"lnum": 2, | ||
"name": "MY_CONSTANT", | ||
"selection_range": { | ||
"col": 15, | ||
"end_col": 26, | ||
"end_lnum": 2, | ||
"lnum": 2 | ||
} | ||
}, | ||
{ | ||
"col": 2, | ||
"end_col": 24, | ||
"end_lnum": 4, | ||
"kind": "Function", | ||
"level": 1, | ||
"lnum": 4, | ||
"name": "PRIVATE_DEF", | ||
"selection_range": { | ||
"col": 6, | ||
"end_col": 17, | ||
"end_lnum": 4, | ||
"lnum": 4 | ||
} | ||
}, | ||
{ | ||
"col": 2, | ||
"end_col": 30, | ||
"end_lnum": 5, | ||
"kind": "Function", | ||
"level": 1, | ||
"lnum": 5, | ||
"name": "PUBLIC_DEF", | ||
"selection_range": { | ||
"col": 13, | ||
"end_col": 23, | ||
"end_lnum": 5, | ||
"lnum": 5 | ||
} | ||
}, | ||
{ | ||
"col": 2, | ||
"end_col": 37, | ||
"end_lnum": 6, | ||
"kind": "Function", | ||
"level": 1, | ||
"lnum": 6, | ||
"name": "DEF WITH SPACES", | ||
"selection_range": { | ||
"col": 13, | ||
"end_col": 30, | ||
"end_lnum": 6, | ||
"lnum": 6 | ||
} | ||
}, | ||
{ | ||
"children": [ | ||
{ | ||
"col": 4, | ||
"end_col": 39, | ||
"end_lnum": 9, | ||
"kind": "Constant", | ||
"level": 2, | ||
"lnum": 9, | ||
"name": "MY_SUB_CONSTANT", | ||
"selection_range": { | ||
"col": 17, | ||
"end_col": 32, | ||
"end_lnum": 9, | ||
"lnum": 9 | ||
} | ||
}, | ||
{ | ||
"col": 4, | ||
"end_col": 30, | ||
"end_lnum": 10, | ||
"kind": "Function", | ||
"level": 2, | ||
"lnum": 10, | ||
"name": "SUB_PRIVATE_DEF", | ||
"selection_range": { | ||
"col": 8, | ||
"end_col": 23, | ||
"end_lnum": 10, | ||
"lnum": 10 | ||
} | ||
}, | ||
{ | ||
"col": 4, | ||
"end_col": 36, | ||
"end_lnum": 11, | ||
"kind": "Function", | ||
"level": 2, | ||
"lnum": 11, | ||
"name": "SUB_PUBLIC_DEF", | ||
"selection_range": { | ||
"col": 15, | ||
"end_col": 29, | ||
"end_lnum": 11, | ||
"lnum": 11 | ||
} | ||
} | ||
], | ||
"col": 2, | ||
"end_col": 3, | ||
"end_lnum": 12, | ||
"kind": "Module", | ||
"level": 1, | ||
"lnum": 8, | ||
"name": "MY_SUB_MODULE", | ||
"selection_range": { | ||
"col": 9, | ||
"end_col": 22, | ||
"end_lnum": 8, | ||
"lnum": 8 | ||
} | ||
} | ||
], | ||
"col": 0, | ||
"end_col": 1, | ||
"end_lnum": 13, | ||
"kind": "Module", | ||
"level": 0, | ||
"lnum": 1, | ||
"name": "MY_MODULE", | ||
"selection_range": { | ||
"col": 7, | ||
"end_col": 16, | ||
"end_lnum": 1, | ||
"lnum": 1 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/fish | ||
|
||
function foo | ||
function bar | ||
function baz | ||
end | ||
end | ||
end | ||
|
||
function foo1 | ||
end | ||
|
||
function foo2 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module MY_MODULE { | ||
export const MY_CONSTANT = "X" | ||
|
||
def PRIVATE_DEF [] { } | ||
export def PUBLIC_DEF [] { } | ||
export def "DEF WITH SPACES" [] { } | ||
|
||
module MY_SUB_MODULE { | ||
export const MY_SUB_CONSTANT = "XX" | ||
def SUB_PRIVATE_DEF [] { } | ||
export def SUB_PUBLIC_DEF [] { } | ||
} | ||
} |