Skip to content

Commit f2321d5

Browse files
committed
All the languages
1 parent 31d60f6 commit f2321d5

File tree

13 files changed

+335
-2
lines changed

13 files changed

+335
-2
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(declaration
2+
declarator: (function_declarator)) @function.around
3+
4+
(function_definition
5+
body: (_
6+
"{"
7+
(_)* @function.inside
8+
"}" )) @function.around
9+
10+
(preproc_function_def
11+
value: (_) @function.inside) @function.around
12+
13+
(comment) @comment.around
14+
15+
(struct_specifier
16+
body: (_
17+
"{"
18+
(_)* @class.inside
19+
"}")) @class.around
20+
21+
(enum_specifier
22+
body: (_
23+
"{"
24+
[(_) ","?]* @class.inside
25+
"}")) @class.around
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
(declaration
2+
declarator: (function_declarator)) @function.around
3+
4+
(function_definition
5+
body: (_
6+
"{"
7+
(_)* @function.inside
8+
"}" )) @function.around
9+
10+
(preproc_function_def
11+
value: (_) @function.inside) @function.around
12+
13+
(comment) @comment.around
14+
15+
(struct_specifier
16+
body: (_
17+
"{"
18+
(_)* @class.inside
19+
"}")) @class.around
20+
21+
(enum_specifier
22+
body: (_
23+
"{"
24+
[(_) ","?]* @class.inside
25+
"}")) @class.around
26+
27+
(class_specifier
28+
body: (_
29+
"{"
30+
[(_) ":"? ";"?]* @class.inside
31+
"}"?)) @class.around
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
(comment) @comment.around
2+
3+
(rule_set
4+
(block (
5+
"{"
6+
(_)* @function.inside
7+
"}" ))) @function.around
8+
(keyframe_block
9+
(block (
10+
"{"
11+
(_)* @function.inside
12+
"}" ))) @function.around
13+
14+
(media_statement
15+
(block (
16+
"{"
17+
(_)* @class.inside
18+
"}" ))) @class.around
19+
20+
(supports_statement
21+
(block (
22+
"{"
23+
(_)* @class.inside
24+
"}" ))) @class.around
25+
26+
(keyframes_statement
27+
(keyframe_block_list (
28+
"{"
29+
(_)* @class.inside
30+
"}" ))) @class.around
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(function_declaration
2+
body: (_
3+
"{"
4+
(_)* @function.inside
5+
"}")) @function.around
6+
7+
(method_declaration
8+
body: (_
9+
"{"
10+
(_)* @function.inside
11+
"}")) @function.around
12+
13+
(type_declaration
14+
(type_spec (struct_type (field_declaration_list (
15+
"{"
16+
(_)* @class.inside
17+
"}")?)))) @class.around
18+
19+
(type_declaration
20+
(type_spec (interface_type
21+
(_)* @class.inside))) @class.around
22+
23+
(type_declaration) @class.around
24+
25+
(comment)+ @comment.around
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
(comment)+ @comment.around
2+
3+
(function_declaration
4+
body: (_
5+
"{"
6+
(_)* @function.inside
7+
"}")) @function.around
8+
9+
(method_definition
10+
body: (_
11+
"{"
12+
(_)* @function.inside
13+
"}")) @function.around
14+
15+
(function_expression
16+
body: (_
17+
"{"
18+
(_)* @function.inside
19+
"}")) @function.around
20+
21+
(arrow_function
22+
body: (statement_block
23+
"{"
24+
(_)* @function.inside
25+
"}")) @function.around
26+
27+
(arrow_function) @function.around
28+
29+
(generator_function
30+
body: (_
31+
"{"
32+
(_)* @function.inside
33+
"}")) @function.around
34+
35+
(generator_function_declaration
36+
body: (_
37+
"{"
38+
(_)* @function.inside
39+
"}")) @function.around
40+
41+
(class_declaration
42+
body: (_
43+
"{"
44+
[(_) ";"?]* @class.inside
45+
"}" )) @class.around
46+
47+
(class
48+
body: (_
49+
"{"
50+
[(_) ";"?]* @class.inside
51+
"}" )) @class.around
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(comment)+ @comment.around
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(comment)+ @comment.around
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(section
2+
(atx_heading)
3+
(_)* @function.inside) @function.around
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(comment)+ @comment.around
2+
3+
(function_definition
4+
body: (_) @function.inside) @function.around
5+
6+
(class_definition
7+
body: (_) @class.inside) @class.around
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
(comment)+ @comment.around
2+
3+
(function_declaration
4+
body: (_
5+
"{"
6+
(_)* @function.inside
7+
"}")) @function.around
8+
9+
(method_definition
10+
body: (_
11+
"{"
12+
(_)* @function.inside
13+
"}")) @function.around
14+
15+
(function_expression
16+
body: (_
17+
"{"
18+
(_)* @function.inside
19+
"}")) @function.around
20+
21+
(arrow_function
22+
body: (statement_block
23+
"{"
24+
(_)* @function.inside
25+
"}")) @function.around
26+
27+
(arrow_function) @function.around
28+
(function_signature) @function.around
29+
30+
(generator_function
31+
body: (_
32+
"{"
33+
(_)* @function.inside
34+
"}")) @function.around
35+
36+
(generator_function_declaration
37+
body: (_
38+
"{"
39+
(_)* @function.inside
40+
"}")) @function.around
41+
42+
(class_declaration
43+
body: (_
44+
"{"
45+
[(_) ";"?]* @class.inside
46+
"}" )) @class.around
47+
48+
(class
49+
body: (_
50+
"{"
51+
(_)* @class.inside
52+
"}" )) @class.around
53+
54+
(interface_declaration
55+
body: (_
56+
"{"
57+
[(_) ";"?]* @class.inside
58+
"}" )) @class.around
59+
60+
(enum_declaration
61+
body: (_
62+
"{"
63+
[(_) ","?]* @class.inside
64+
"}" )) @class.around
65+
66+
(ambient_declaration
67+
(module
68+
body: (_
69+
"{"
70+
[(_) ";"?]* @class.inside
71+
"}" ))) @class.around
72+
73+
(internal_module
74+
body: (_
75+
"{"
76+
[(_) ";"?]* @class.inside
77+
"}" )) @class.around
78+
79+
(type_alias_declaration) @class.around

0 commit comments

Comments
 (0)