Skip to content

Commit c1b1199

Browse files
committed
Fix function names scope and tests
1 parent d34e880 commit c1b1199

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

data/fixtures/scopes/r/functionName.scope

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@ abc <- function(arg){
33
}
44
---
55

6-
[Content] =
7-
[Domain] = 0:0-0:3
6+
[Content] = 0:0-0:3
87
>---<
98
0| abc <- function(arg){
109

1110
[Removal] = 0:0-0:7
1211
>-------<
1312
0| abc <- function(arg){
14-
1| TRUE
15-
2| }
1613

1714
[Trailing delimiter] = 0:3-0:7
1815
>----<
1916
0| abc <- function(arg){
17+
18+
[Domain] = 0:0-2:1
19+
>---------------------
20+
0| abc <- function(arg){
2021
1| TRUE
2122
2| }
23+
-<
2224

23-
[Insertion delimiter] = " <- "
25+
[Insertion delimiter] = " "

queries/r.scm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@
6868
(binary_operator
6969
;;!! abc <- function(x){ }
7070
;;! ^^^
71-
lhs: (identifier) @functionName @functionName.leading.endOf
71+
lhs: (identifier) @functionName
7272
rhs: (function_definition
7373
name: "function"
7474
parameters: (parameters)
7575
body: (braced_expression) @interior
76-
)
76+
) @functionName.trailing.startOf
7777
) @namedFunction @_.domain
7878

7979
;;!! foo()

0 commit comments

Comments
 (0)