@@ -311,57 +311,6 @@ E.g. Foo<int> has a paired delimiter, 1 > 2 does not."
311311 (set-match-data match-data)
312312 (goto-char found-pos))))
313313
314- (defun hack-font-lock-unsafe (limit )
315- " Search for UNSAFE comments."
316- (let ((case-fold-search nil )
317- (found-pos nil )
318- (match-data nil ))
319- ; ; UNSAFE must start with //, and can have any text afterwards. See
320- ; ; full_fidelity_lexer.ml.
321- (save-excursion
322- ; ; TODO: this 'not found-pos' is a common pattern, factor it out.
323- (while (and (not found-pos)
324- (search-forward " UNSAFE" limit t ))
325- (let* ((ppss (syntax-ppss ))
326- (in-comment (nth 4 ppss))
327- (comment-start (nth 8 ppss)))
328- (when in-comment
329- (save-excursion
330- (goto-char comment-start)
331- (when (re-search-forward
332- (rx point " //" (0+ whitespace) (group " UNSAFE" ))
333- limit t )
334- (setq found-pos (point ))
335- (setq match-data (match-data ))))))))
336- (when found-pos
337- (set-match-data match-data)
338- (goto-char found-pos))))
339-
340- (defun hack-font-lock-unsafe-expr (limit )
341- " Search for UNSAFE_EXPR comments."
342- (let ((case-fold-search nil )
343- (found-pos nil )
344- (match-data nil ))
345- ; ; UNSAFE_EXPR must start with /*, and can have any text afterwards. See
346- ; ; full_fidelity_lexer.ml.
347- (save-excursion
348- (while (and (not found-pos)
349- (search-forward " UNSAFE_EXPR" limit t ))
350- (let* ((ppss (syntax-ppss ))
351- (in-comment (nth 4 ppss))
352- (comment-start (nth 8 ppss)))
353- (when in-comment
354- (save-excursion
355- (goto-char comment-start)
356- (when (re-search-forward
357- (rx point " /*" (0+ whitespace) (group " UNSAFE_EXPR" ))
358- limit t )
359- (setq found-pos (point ))
360- (setq match-data (match-data ))))))))
361- (when found-pos
362- (set-match-data match-data)
363- (goto-char found-pos))))
364-
365314(defun hack-font-lock-fixme (limit )
366315 " Search for HH_FIXME comments."
367316 (let ((case-fold-search nil )
@@ -1280,10 +1229,6 @@ interpolating inside the XHP expression."
12801229
12811230 (hack-font-lock-fallthrough
12821231 (1 'font-lock-keyword-face t ))
1283- (hack-font-lock-unsafe
1284- (1 'error t ))
1285- (hack-font-lock-unsafe-expr
1286- (1 'error t ))
12871232 (hack-font-lock-fixme
12881233 (1 'error t ))
12891234 (hack-font-lock-ignore-error
0 commit comments