@@ -204,54 +204,48 @@ Returns keywords suitable for `font-lock-keywords'."
204
204
(concat line-prefix " \\ (" varid " \\ |" conid " \\ )\\ s-*`\\ (" varid " \\ )`" ))
205
205
(topdecl-sym
206
206
(concat line-prefix " \\ (" varid " \\ |" conid " \\ )\\ s-*\\ (" sym " \\ )" ))
207
- (topdecl-sym2 (concat line-prefix " (\\ (" sym " \\ ))" ))
208
-
209
- keywords)
210
-
211
- (setq keywords
212
- `(; ; NOTICE the ordering below is significant
213
- ; ;
214
- (, toplevel-keywords 1 (symbol-value 'purescript-keyword-face ))
215
- (, reservedid 1 (symbol-value 'purescript-keyword-face ))
216
- (, reservedsym 1 (symbol-value 'purescript-operator-face ))
217
- ; ; Special case for `as' , `hiding' , `safe' and `qualified' , which are
218
- ; ; keywords in import statements but are not otherwise reserved.
219
- (" \\ <import[ \t ]+\\ (?:\\ (safe\\ >\\ )[ \t ]*\\ )?\\ (?:\\ (qualified\\ >\\ )[ \t ]*\\ )?[^ \t\n ()]+[ \t ]*\\ (?:\\ (\\ <as\\ >\\ )[ \t ]*[^ \t\n ()]+[ \t ]*\\ )?\\ (\\ <hiding\\ >\\ )?"
220
- (1 (symbol-value 'purescript-keyword-face ) nil lax)
221
- (2 (symbol-value 'purescript-keyword-face ) nil lax)
222
- (3 (symbol-value 'purescript-keyword-face ) nil lax)
223
- (4 (symbol-value 'purescript-keyword-face ) nil lax))
224
-
225
- (, reservedsym 1 (symbol-value 'purescript-operator-face ))
226
- ; ; Case for `foreign import'
227
- (,(rx line-start (0+ whitespace)
228
- (group " foreign" ) (1+ whitespace) (group " import" ) word-end)
229
- (1 (symbol-value 'purescript-keyword-face ) nil lax)
230
- (2 (symbol-value 'purescript-keyword-face ) nil lax))
231
-
232
- (, reservedsym 1 (symbol-value 'purescript-operator-face ))
233
- ; ; Toplevel Declarations.
234
- ; ; Place them *before* generic id-and-op highlighting.
235
- (, topdecl-var (1 (symbol-value 'purescript-definition-face )))
236
- (, topdecl-var2 (2 (symbol-value 'purescript-definition-face )))
237
- (, topdecl-sym (2 (symbol-value 'purescript-definition-face )))
238
- (, topdecl-sym2 (1 (symbol-value 'purescript-definition-face )))
239
-
240
- ; ; These four are debatable...
241
- (" (\\ (,*\\ |->\\ ))" 0 (symbol-value 'purescript-constructor-face ))
242
- (" \\ [\\ ]" 0 (symbol-value 'purescript-constructor-face ))
243
- ; ; Expensive.
244
- (, qvarid 0 (symbol-value 'purescript-default-face ))
245
- (, qconid 0 (symbol-value 'purescript-constructor-face ))
246
- (,(concat " \` " varid " \` " ) 0 (symbol-value 'purescript-operator-face ))
247
- ; ; Expensive.
248
- (, conid 0 (symbol-value 'purescript-constructor-face ))
249
-
250
- ; ; Very expensive.
251
- (, sym 0 (if (eq (char-after (match-beginning 0 )) ?: )
252
- purescript-constructor-face
253
- purescript-operator-face))))
254
- keywords))
207
+ (topdecl-sym2 (concat line-prefix " (\\ (" sym " \\ ))" )))
208
+
209
+ `(; ; NOTICE the ordering below is significant
210
+ ; ;
211
+ (, toplevel-keywords 1 (symbol-value 'purescript-keyword-face ))
212
+ (, reservedid 1 (symbol-value 'purescript-keyword-face ))
213
+ (, reservedsym 1 (symbol-value 'purescript-operator-face ))
214
+ ; ; Special case for `as' , `hiding' , `safe' and `qualified' , which are
215
+ ; ; keywords in import statements but are not otherwise reserved.
216
+ (" \\ <import[ \t ]+\\ (?:\\ (safe\\ >\\ )[ \t ]*\\ )?\\ (?:\\ (qualified\\ >\\ )[ \t ]*\\ )?[^ \t\n ()]+[ \t ]*\\ (?:\\ (\\ <as\\ >\\ )[ \t ]*[^ \t\n ()]+[ \t ]*\\ )?\\ (\\ <hiding\\ >\\ )?"
217
+ (1 (symbol-value 'purescript-keyword-face ) nil lax)
218
+ (2 (symbol-value 'purescript-keyword-face ) nil lax)
219
+ (3 (symbol-value 'purescript-keyword-face ) nil lax)
220
+ (4 (symbol-value 'purescript-keyword-face ) nil lax))
221
+
222
+ ; ; Case for `foreign import'
223
+ (,(rx line-start (0+ whitespace)
224
+ (group " foreign" ) (1+ whitespace) (group " import" ) word-end)
225
+ (1 (symbol-value 'purescript-keyword-face ) nil lax)
226
+ (2 (symbol-value 'purescript-keyword-face ) nil lax))
227
+
228
+ ; ; Toplevel Declarations.
229
+ ; ; Place them *before* generic id-and-op highlighting.
230
+ (, topdecl-var (1 (symbol-value 'purescript-definition-face )))
231
+ (, topdecl-var2 (2 (symbol-value 'purescript-definition-face )))
232
+ (, topdecl-sym (2 (symbol-value 'purescript-definition-face )))
233
+ (, topdecl-sym2 (1 (symbol-value 'purescript-definition-face )))
234
+
235
+ ; ; These four are debatable...
236
+ (" (\\ (,*\\ |->\\ ))" 0 (symbol-value 'purescript-constructor-face ))
237
+ (" \\ [\\ ]" 0 (symbol-value 'purescript-constructor-face ))
238
+ ; ; Expensive.
239
+ (, qvarid 0 (symbol-value 'purescript-default-face ))
240
+ (, qconid 0 (symbol-value 'purescript-constructor-face ))
241
+ (,(concat " \` " varid " \` " ) 0 (symbol-value 'purescript-operator-face ))
242
+ ; ; Expensive.
243
+ (, conid 0 (symbol-value 'purescript-constructor-face ))
244
+
245
+ ; ; Very expensive.
246
+ (, sym 0 (if (eq (char-after (match-beginning 0 )) ?: )
247
+ purescript-constructor-face
248
+ purescript-operator-face)))))
255
249
256
250
; ; The next three aren't used in Emacs 21.
257
251
0 commit comments