Debian Codegraph @

runtime/queries/slisp/highlights.scm

raw symbols SCIP
1 ;; Keywords
2 [ "if" "prog" ] @keyword
3
4 ;; Let binding
5 [ "let" ] @keyword
6
7 ;; Apply
8 (apply_stmt . (symbol) @function)
9
10 ;; Quasiquote template head (constructed application)
11 (quasi_list . (symbol) @function)
12
13 ;; Use module
14 [ "use" ] @keyword
15
16 (use_module_global (quote) . (symbol) @namespace)
17 (use_module_select (quote) . (symbol) @namespace)
18
19 ;; Val definition
20 [ "val" ] @keyword
21
22 (val_definition name: (symbol) @constant)
23
24 ;; External definitions
25 [ "ext" ] @keyword
26
27 (external_definition name: (symbol) @function)
28 (external_definition signature: (signature (symbol) @variable.parameter (dot) (external_type) @type.builtin))
29 (external_definition docstring: (string) @string.documentation)
30 (external_definition return_type: (external_type) @type.builtin)
31
32 ;; Function definitions
33 [ "def" ] @keyword
34
35 (function_definition name: (symbol) @function)
36 (function_definition parameters: (parameters (symbol) @variable.parameter))
37 (function_definition docstring: (string) @string.documentation)
38
39 ;; Macro definitions
40 [ "mac" ] @keyword
41
42 (macro_definition name: (symbol) @function)
43 (macro_definition parameters: (parameters (symbol) @variable.parameter))
44 (macro_definition docstring: (string) @string.documentation)
45
46 ;; Lambda
47 [ "\\" ] @keyword
48
49 (lambda_stmt parameters: (parameters (symbol) @variable.parameter))
50 (lambda_stmt docstring: (string) @string.documentation)
51
52 ;; Decons bindings.
53 (decons_stmt (symbol) @variable.parameter)
54 (decons_item (symbol) @variable.parameter)
55
56 ;; Atoms
57 (char) @constant.character
58 (comment) @comment
59 (number) @constant.numeric
60 (string) @string
61
62 ;; Punctuation
63 [ "(" ")" ] @punctuation.bracket
64
65 ;; Operators
66 (ampersand) @operator
67 (colon) @operator
68 (dot) @operator
69 (tilde) @operator
70 (tilde_splice) @operator
71 (backquote) @operator
72 (quote) @operator
73 (unquote) @operator
74 (unquote_splice) @operator
75
76 ;; Highlight wildcard as constant
77 (wildcard) @constant.builtin
78
79 ;; Highlight nil as constant
80 [ "nil" ] @constant.builtin
81
82 ;; Highlight as t as boolean constant
83 [ "T" ] @constant.builtin.boolean
84
85 ;; Highlight variable names used in anamorphic macros.
86 [ "it" "self" ] @variable.builtin
87
88 ;; Highlight generated symbols (#name) used for macro hygiene.
89 (gensym) @variable.special