File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,16 @@ Note that (match-string 1) returns the unqualified part.")
107
107
Note that negative sign char is not part of a number." )
108
108
109
109
(defconst haskell-lexeme-char-literal-inside
110
- (rx (| (regexp " [^ \n '\\ ] " )
110
+ (rx (| (not (any " \n '\\ " ) )
111
111
(: " \\ "
112
112
(| " a" " b" " f" " n" " r" " t" " v" " \\ " " \" " " '"
113
113
" NUL" " SOH" " STX" " ETX" " EOT" " ENQ" " ACK"
114
114
" BEL" " BS" " HT" " LF" " VT" " FF" " CR" " SO" " SI" " DLE"
115
115
" DC1" " DC2" " DC3" " DC4" " NAK" " SYN" " ETB" " CAN"
116
116
" EM" " SUB" " ESC" " FS" " GS" " RS" " US" " SP" " DEL"
117
+ (regexp " [0-9]+" )
118
+ (: " x" (regexp " [0-9a-fA-F]+" ))
119
+ (: " o" (regexp " [0-7]+" ))
117
120
(: " ^" (regexp " []A-Z@^_\\ []" ))))))
118
121
" Regexp matching an inside of a character literal." )
119
122
Original file line number Diff line number Diff line change 36
36
(" _f" " w" haskell-symbol-face)
37
37
(" _'''" " w" haskell-symbol-face))))
38
38
39
+ (ert-deftest haskell-syntactic-test-character-literal-escapes ()
40
+ (check-properties
41
+ '(" '\\ 000' '\\ x01'" )
42
+ '((" '\\ 000'" t font-lock-string-face )
43
+ (" '\\ x01'" t font-lock-string-face ))))
39
44
40
45
(ert-deftest haskell-syntactic-test-7 ()
41
46
" Take quotes and double quotes under control."
You can’t perform that action at this time.
0 commit comments