Skip to content

Commit

Permalink
Revert call domain
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson committed Dec 13, 2023
1 parent ef3b29b commit 96eb2ea
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ new Foo.bar(0);
---

[Content] =
[Removal] = 0:0-0:14
[Removal] =
[Domain] = 0:0-0:14
0| new Foo.bar(0);
>--------------<

[Domain] = 0:0-0:15
0| new Foo.bar(0);
>---------------<

[Insertion delimiter] = " "
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ foo.bar(0);
---

[Content] =
[Removal] = 0:0-0:10
[Removal] =
[Domain] = 0:0-0:10
0| foo.bar(0);
>----------<

[Domain] = 0:0-0:11
0| foo.bar(0);
>-----------<

[Insertion delimiter] = " "
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ new Foo.bar(0);
0| new Foo.bar(0);
>-----------<

[Domain] = 0:0-0:15
[Domain] = 0:0-0:14
0| new Foo.bar(0);
>---------------<
>--------------<

[Insertion delimiter] = " "
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ foo.bar(0);
0| foo.bar(0);
>-------<

[Domain] = 0:0-0:11
[Domain] = 0:0-0:10
0| foo.bar(0);
>-----------<
>----------<

[Insertion delimiter] = " "
29 changes: 10 additions & 19 deletions queries/javascript.core.scm
Original file line number Diff line number Diff line change
Expand Up @@ -480,33 +480,24 @@
;;! ^^^^^
;;!! new Foo()
;;! ^^^^^^^^^
(
[
(call_expression)
(new_expression)
] @functionCall @_.domain.start
";"? @_.domain.end
)
[
(call_expression)
(new_expression)
] @functionCall @_.domain.start

;;!! foo();
;;! ^^^
;;! ------
(
(call_expression
function: (_) @functionCallee
) @_.domain.start
";"? @_.domain.end
)
(call_expression
function: (_) @functionCallee
) @_.domain.start

;;!! new Foo();
;;! ^^^^^^^
;;! ----------
(
(new_expression
(arguments) @functionCallee.end.startOf
) @functionCallee.start.startOf @_.domain.start
";"? @_.domain.end
)
(new_expression
(arguments) @functionCallee.end.startOf
) @functionCallee.start.startOf @_.domain.start

;;!! class Foo {}
;;! ^^^^^^^^^^^^
Expand Down

0 comments on commit 96eb2ea

Please sign in to comment.