128
128
; ; This is probably just wrong, but it used to use
129
129
; ; `font-lock-function-name-face' with a result that was not consistent with
130
130
; ; other major modes, so I just exchanged with `purescript-definition-face' .
131
- (defvar purescript-operator-face 'font-lock-variable-name -face )
131
+ (defvar purescript-operator-face 'font-lock-builtin -face )
132
132
(defvar purescript-default-face nil )
133
133
(defvar purescript-literate-comment-face 'font-lock-doc-face
134
134
" Face with which to fontify literate comments.
@@ -165,12 +165,10 @@ Returns keywords suitable for `font-lock-keywords'."
165
165
; ; be thrown for some reason by backslash's escape syntax.
166
166
" \\ (\\ s_\\ |\\\\\\ )+" )
167
167
168
- ; ; Reserved operations
169
- (reservedsym
168
+ (operator
170
169
(concat " \\ S_"
171
- ; ; (regexp-opt '(".." "::" "=" "\\ " "|" "<-" "->"
172
- ; ; "@" "~" "=>") t)
173
- " \\ (->\\ |\\ .\\ .\\ |::\\ |∷\\ |<-\\ |=>\\ |[=@\\ |~]\\ )"
170
+ ; ; All punctuation, excluding (),;[]{}_"'`
171
+ " \\ ([!@#$%^&*+\\ -./<=>?@|~:∷\\\\ ]+\\ )"
174
172
" \\ S_" ))
175
173
; ; These are only keywords when appear at top-level, optionally with
176
174
; ; indentation. They are not reserved and in other levels would represent
@@ -210,7 +208,7 @@ Returns keywords suitable for `font-lock-keywords'."
210
208
; ;
211
209
(, toplevel-keywords 1 (symbol-value 'purescript-keyword-face ))
212
210
(, reservedid 1 (symbol-value 'purescript-keyword-face ))
213
- (, reservedsym 1 (symbol-value 'purescript-operator-face ))
211
+ (, operator 1 (symbol-value 'purescript-operator-face ))
214
212
; ; Special case for `as' , `hiding' , `safe' and `qualified' , which are
215
213
; ; keywords in import statements but are not otherwise reserved.
216
214
(" \\ <import[ \t ]+\\ (?:\\ (safe\\ >\\ )[ \t ]*\\ )?\\ (?:\\ (qualified\\ >\\ )[ \t ]*\\ )?[^ \t\n ()]+[ \t ]*\\ (?:\\ (\\ <as\\ >\\ )[ \t ]*[^ \t\n ()]+[ \t ]*\\ )?\\ (\\ <hiding\\ >\\ )?"
@@ -232,13 +230,12 @@ Returns keywords suitable for `font-lock-keywords'."
232
230
(, topdecl-sym (2 (symbol-value 'purescript-definition-face )))
233
231
(, topdecl-sym2 (1 (symbol-value 'purescript-definition-face )))
234
232
235
- ; ; These four are debatable...
236
- (" (\\ (,*\\ |->\\ ))" 0 (symbol-value 'purescript-constructor-face ))
233
+ ; ; This one is debatable…
237
234
(" \\ [\\ ]" 0 (symbol-value 'purescript-constructor-face ))
238
235
; ; Expensive.
239
236
(, qvarid 0 (symbol-value 'purescript-default-face ))
240
237
(, qconid 0 (symbol-value 'purescript-constructor-face ))
241
- (,(concat " \ `" varid " \ `" ) 0 (symbol-value 'purescript-operator-face ))
238
+ (,(concat " `" varid " `" ) 0 (symbol-value 'purescript-operator-face ))
242
239
; ; Expensive.
243
240
(, conid 0 (symbol-value 'purescript-constructor-face ))
244
241
0 commit comments