Skip to content

Commit 65c2faa

Browse files
committed
Add call & callee
1 parent 9f564c3 commit 65c2faa

File tree

5 files changed

+39
-14
lines changed

5 files changed

+39
-14
lines changed

data/playground/haskell/branch.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ fromEither f g x = case x of
2525
Right r -> g r
2626

2727
someFunction x (y1 : y2 : ys) (a, b, (c, [d])) = undefined
28+
29+
compose :: (a -> b) -> (b -> c) -> (a -> c)
30+
compose f g x = g (f x)
31+
32+
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
33+
zipWith f [] [] = []
34+
zipWith f (x : xs) (y : ys) = f x y : zipWith f xs ys

queries/haskell.scm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
;; import haskell/haskell.argumentOrParameter.iteration.scm
33
;; import haskell/haskell.branch.scm
44
;; import haskell/haskell.branch.iteration.scm
5+
;; import haskell/haskell.functionCall.scm
6+
;; import haskell/haskell.functionCallee.scm
57
;; import haskell/haskell.functionName.scm
68
;; import haskell/haskell.name.function.scm
79
;; import haskell/haskell.namedFunction.scm
Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
;; argumentOrParameter: function
2-
(function
3-
patterns: (patterns
4-
(_) @argumentOrParameter
5-
)
6-
)
1+
;; argumentOrParameter: actual argument
2+
(pat_apply) @argumentOrParameter
3+
(pat_as) @argumentOrParameter
4+
(pat_field) @argumentOrParameter
5+
(pat_fields) @argumentOrParameter
6+
(pat_infix) @argumentOrParameter
7+
(pat_irrefutable) @argumentOrParameter
8+
(pat_list) @argumentOrParameter
9+
(pat_literal) @argumentOrParameter
10+
(pat_name) @argumentOrParameter
11+
(pat_negation) @argumentOrParameter
12+
(pat_parens) @argumentOrParameter
13+
(pat_record) @argumentOrParameter
14+
(pat_strict) @argumentOrParameter
15+
(pat_tuple) @argumentOrParameter
16+
(pat_typed) @argumentOrParameter
17+
(pat_unboxed_tuple) @argumentOrParameter
18+
(pat_view) @argumentOrParameter
19+
(pat_wildcard) @argumentOrParameter
720

8-
;; argumentOrParameter: exp_case
9-
(exp_case
10-
(alts
11-
(alt
12-
.
13-
(_) @argumentOrParameter
14-
)
15-
)
21+
;; argumentOrParameter: formal argument
22+
(exp_apply
1623
.
24+
(_)
25+
(_) @argumentOrParameter
1726
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
;; functionCall: exp_apply
2+
(exp_apply) @functionCall
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
;; functionCallee: exp_apply
2+
(exp_apply
3+
.
4+
(_) @functionCallee
5+
)

0 commit comments

Comments
 (0)