File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 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.")
107107Note that negative sign char is not part of a number." )
108108
109109(defconst haskell-lexeme-char-literal-inside
110- (rx (| (regexp " [^ \n '\\ ] " )
110+ (rx (| (not (any " \n '\\ " ) )
111111 (: " \\ "
112112 (| " a" " b" " f" " n" " r" " t" " v" " \\ " " \" " " '"
113113 " NUL" " SOH" " STX" " ETX" " EOT" " ENQ" " ACK"
114114 " BEL" " BS" " HT" " LF" " VT" " FF" " CR" " SO" " SI" " DLE"
115115 " DC1" " DC2" " DC3" " DC4" " NAK" " SYN" " ETB" " CAN"
116116 " 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]+" ))
117120 (: " ^" (regexp " []A-Z@^_\\ []" ))))))
118121 " Regexp matching an inside of a character literal." )
119122
Original file line number Diff line number Diff line change 3636 (" _f" " w" haskell-symbol-face)
3737 (" _'''" " w" haskell-symbol-face))))
3838
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 ))))
3944
4045(ert-deftest haskell-syntactic-test-7 ()
4146 " Take quotes and double quotes under control."
You can’t perform that action at this time.
0 commit comments