@@ -37,7 +37,9 @@ repository:
37
37
variable-reference :
38
38
patterns :
39
39
- name : variable.other.dw
40
- match : \b(?!(fun|input|output|type|var|ns|import|%dw|private|---)\s)((\+\+|\-\-|[A-Za-z])[a-zA-Z0-9_]*)
40
+ match : \b(?!(fun|input|output|type|var|ns|import|%dw|private|---)\b)((\+\+|\-\-|[A-Za-z])[a-zA-Z0-9_]*)
41
+ - name : invalid
42
+ match : \b(fun|input|output|type|var|ns|import|private)\b
41
43
- name : variable.parameter.dw
42
44
match : (\$+)
43
45
@@ -127,9 +129,16 @@ repository:
127
129
' 2 ' : {name: comment.dw}
128
130
end : (?=\n)
129
131
132
+ infix :
133
+ name : support.function.dw
134
+ # match: (?<!^,|\[|\(|=|\+|>|<|\-|\*|:|\{|case|is|else|not)[ \t]*(?!(var|match|case|else|fun|input|output|is|as|default|ns|import|null|false|true|using|do|not|and|or)\b)(\+\+|\-\-|[a-zA-Z][a-zA-Z_0-9]*)\b(?![,\)}\]\n])
135
+ match : (?<!^|,|\[|\(|=|\+|>|<|\-|\*|:|\{|case|is|else|not|as|and|or)(?<=[a-zA-Z0-9_$\}\])"'`|/])\s*(?!(var|match|case|else|fun|input|output|is|as|default|ns|import|null|false|true|using|do|not|and|or)\s)(\+\+|\-\-|[a-zA-Z][a-zA-Z_0-9]*)(\s+|\s*(?=["'/|{]))
136
+
130
137
expressions :
131
138
name : expression
132
139
patterns :
140
+ - name : keyword.other.dw
141
+ match : \b(not)\s+
133
142
- include : ' #paren-expression'
134
143
- include : ' #strings'
135
144
- include : ' #constants'
@@ -147,6 +156,7 @@ repository:
147
156
- include : ' #variable-reference'
148
157
- include : ' #selectors'
149
158
- include : ' #directives'
159
+ - include : ' #infix'
150
160
151
161
152
162
generics :
@@ -170,7 +180,7 @@ repository:
170
180
end : (?=\n)
171
181
beginCaptures :
172
182
' 1 ' : {name: storage.type.dw}
173
- ' 2 ' : {name: variable.language .dw}
183
+ ' 2 ' : {name: entity.name.variable .dw}
174
184
patterns :
175
185
- begin : (\:\s*)
176
186
beginCaptures :
@@ -185,26 +195,24 @@ repository:
185
195
186
196
keywords :
187
197
patterns :
188
- - name : support.function.dw
189
- match : \s(match)\s(?!\{)
190
- - name : support.function.dw
191
- match : (?<!case)\s*\b(matches)\b
192
- - name : support.function.dw
193
- match : \b(abs|avg|ceil|contains|distinctBy|endsWith|filter|find|flatten|floor|groupBy|isBlank|isDecimal|isEmpty|isEven|isInteger|isLeapYear|isOdd|joinBy|log|lower|map|mapObject|max|maxBy|min|minBy|mod|native|now|orderBy|orderBy|pluck|pluck|pow|random|read|readUrl|reduce|reduce|replace|round|scan|sizeOf|splitBy|sqrt|startsWith|sum|to|trim|typeOf|unzip|upper|with|write|zip)\b
198
+ # - name: support.function.dw
199
+ # match: \b(abs|avg|ceil|contains|distinctBy|endsWith|filter|find|flatten|floor|groupBy|isBlank|isDecimal|isEmpty|isEven|isInteger|isLeapYear|isOdd|joinBy|log|lower|map|mapObject|max|maxBy|min|minBy|mod|native|now|orderBy|orderBy|pluck|pluck|pow|random|read|readUrl|reduce|reduce|replace|round|scan|sizeOf|splitBy|sqrt|startsWith|sum|to|trim|typeOf|unzip|upper|with|write|zip)\b
194
200
- name : keyword.reserved.dw
195
- match : \b(throw|do|for|yield|enum|private|async)\b
201
+ match : \b(throw|for|yield|enum|private|async)\b
202
+ - name : invalid
203
+ match : \b(not)\b
196
204
- name : keyword.control.dw
197
205
match : \b(if|else|while|for|do|using|unless|default)\b
198
206
- name : keyword.operator.comparison.dw
199
- match : (~=|==|!=|===|!= =|<=|>=|<|>)
207
+ match : (~=|==|!=|! =|<=|>=|<|>)
200
208
- name : keyword.operator.assignment.dw
201
209
match : (=)
202
210
- name : keyword.operator.declaration.dw
203
211
match : (:)
204
212
- name : keyword.operator.arithmetic.dw
205
213
match : (\-|\+|\*|\/)
206
214
- name : keyword.other.dw
207
- match : \b(not| and|or)\b
215
+ match : \b(and|or)\b
208
216
209
217
match-block :
210
218
name : match-block.expr.dw
0 commit comments