summaryrefslogtreecommitdiff
path: root/runtime/queries/prql/highlights.scm
blob: 8b67487b23d7328df901f565874ce4b067631cb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[
  (keyword_from)
  (keyword_filter)
  (keyword_derive)
  (keyword_group)
  (keyword_aggregate)
  (keyword_sort)
  (keyword_take)
  (keyword_window)
  (keyword_join)
  (keyword_select)
  (keyword_case)
  (keyword_append)
  (keyword_remove)
  (keyword_intersect)
  (keyword_rolling)
  (keyword_rows)
  (keyword_expanding)
  (keyword_let)
  (keyword_prql)
  (keyword_from_text)
  (keyword_loop)
] @keyword

(literal) @string

(assignment
  alias: (field) @variable.other.member)

alias: (identifier) @variable.other.member

(f_string) @string.special
(s_string) @string.special

(comment) @comment

(function_call
  (identifier) @function)

[
  "+"
  "-"
  "*"
  "/"
  "="
  "=="
  "<"
  "<="
  "!="
  ">="
  ">"
  "&&"
  "||"
  "//"
  "~="
  (bang)
] @operator

[
  "("
  ")"
  "{"
  "}"
] @punctuation.bracket

[
  ","
  "."
  (pipe)
  "->"
] @punctuation.delimiter

(literal
  (integer) @constant.numeric.integer)

(integer) @constant.numeric.integer

(literal
  (decimal_number) @constant.numeric.float)

(decimal_number) @constant.numeric.float

[
  (keyword_min)
  (keyword_max)
  (keyword_count)
  (keyword_count_distinct)
  (keyword_average)
  (keyword_avg)
  (keyword_sum)
  (keyword_stddev)
  (keyword_count)
  (keyword_lag)
  (keyword_lead)
  (keyword_first)
  (keyword_last)
  (keyword_rank)
  (keyword_row_number)
  (keyword_round)
  (keyword_all)
  (keyword_map)
] @function

[
 (keyword_side)
 (keyword_version)
 (keyword_target)
 (keyword_null)
 (keyword_format)
] @attribute

(target) @function.builtin

 [
  (date)
  (time)
  (timestamp)
] @string.special

[
  (keyword_left)
  (keyword_inner)
  (keyword_right)
  (keyword_full)
  (keyword_csv)
  (keyword_json)
] @function.method

[
  (keyword_true)
  (keyword_false)
] @constant.builtin.boolean

(function_definition
  (keyword_let)
  name: (identifier) @function)

(parameter
  (identifier) @variable.parameter)

(variable
  (keyword_let)
  name: (identifier) @constant)