File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
; Identifier naming conventions
2
2
3
+ (identifier) @variable
4
+
3
5
((identifier) @constructor
4
6
(#match? @constructor "^[A-Z]"))
5
7
6
8
((identifier) @constant
7
9
(#match? @constant "^[A-Z][A-Z_]*$"))
8
10
9
- ; Builtin functions
10
-
11
- ((call
12
- function: (identifier) @function.builtin )
13
- (#match?
14
- @function.builtin
15
- "^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))
16
-
17
11
; Function calls
18
12
19
13
(decorator) @function
23
17
(call
24
18
function: (identifier) @function )
25
19
20
+ ; Builtin functions
21
+
22
+ ((call
23
+ function: (identifier) @function.builtin )
24
+ (#match?
25
+ @function.builtin
26
+ "^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))
27
+
26
28
; Function definitions
27
29
28
30
(function_definition
29
31
name: (identifier) @function )
30
32
31
- (identifier) @variable
32
33
(attribute attribute: (identifier) @property )
33
34
(type (identifier) @type )
34
35
You can’t perform that action at this time.
0 commit comments