Function: haskell-lexeme-looking-at-string-literal
haskell-lexeme-looking-at-string-literal is a natively compiled
function defined in haskell-lexeme.el.
Signature
(haskell-lexeme-looking-at-string-literal)
Documentation
Non-nil when point is at a string literal lookalike.
Note that this function matches more than Haskell Report specifies because we want to support also code under edit.
Plain string literals end with double quote or unescaped newline or end of buffer. Multiline string literals (GHC MultilineStrings extension, opened with three double quotes) end at the first unescaped triple double quote and may span several lines.
After successful match:
(match-text 1) matches the opening quote or triple quote.
(match-text 2) matches the inside of the string.
(match-text 3) matches the closing quote or triple quote, or
is nil when the literal is unterminated.
Source Code
;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-lexeme.el
(defun haskell-lexeme-looking-at-string-literal ()
"Non-nil when point is at a string literal lookalike.
Note that this function matches more than Haskell Report
specifies because we want to support also code under edit.
Plain string literals end with double quote or unescaped
newline or end of buffer. Multiline string literals (GHC
MultilineStrings extension, opened with three double quotes)
end at the first unescaped triple double quote and may span
several lines.
After successful match:
(match-text 1) matches the opening quote or triple quote.
(match-text 2) matches the inside of the string.
(match-text 3) matches the closing quote or triple quote, or
is nil when the literal is unterminated."
(cond
((looking-at "\"\"\"") (haskell-lexeme--scan-string-literal 3 nil))
((looking-at "\"") (haskell-lexeme--scan-string-literal 1 t))))