Variable: haskell-lexeme-string-literal

haskell-lexeme-string-literal is a variable defined in haskell-lexeme.el.

Value

"\\(\"\\)\\(\\(?:\\\\[  \n
\f]*\\\\\\|\\\\[       \n
\f]+\\|\\\\[^  \n
\f]\\|[^\"\n\\]*\\)*\\)\\(\"\\|$\\|\\\\?\\'\\)"

Documentation

Regexp matching a string literal lookalike.

Note that haskell-lexeme-string-literal matches more than Haskell Report specifies because we want to support also code under edit.

String literals end with double quote or unescaped newline or end of buffer.

Note that this regexp does not cover multiline string literals
(GHC MultilineStrings extension); see
haskell-lexeme-looking-at-string-literal for those.

Regexp has subgroup expressions:
 (match-text 1) matches the opening double quote.
 (match-text 2) matches the inside of the string.
 (match-text 3) matches the closing double quote or an empty string
                at the end of line or the end buffer.

Source Code

;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-lexeme.el
(defconst haskell-lexeme-string-literal
  (rx (: (group "\"")
         (group (* (| (regexp "\\\\[ \t\n\r\v\f]*\\\\")
                      (regexp "\\\\[ \t\n\r\v\f]+")
                      (regexp "\\\\[^ \t\n\r\v\f]")
                      (* (regexp "[^\"\n\\]")))))
         (group (| "\"" (regexp "$") (regexp "\\\\?\\'")
                   ))))
  "Regexp matching a string literal lookalike.

Note that `haskell-lexeme-string-literal' matches more than
Haskell Report specifies because we want to support also code
under edit.

String literals end with double quote or unescaped newline or end
of buffer.

Note that this regexp does not cover multiline string literals
\(GHC MultilineStrings extension); see
`haskell-lexeme-looking-at-string-literal' for those.

Regexp has subgroup expressions:
 (match-text 1) matches the opening double quote.
 (match-text 2) matches the inside of the string.
 (match-text 3) matches the closing double quote or an empty string
                at the end of line or the end buffer.")