summaryrefslogtreecommitdiff
path: root/pygments/lexers/haskell.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2022-10-27 08:29:41 +0200
committerGeorg Brandl <georg@python.org>2022-10-27 11:58:29 +0200
commitcffc5df62c258ca39fc7474f7197f2df33ab014f (patch)
treeaff878367d037e4f7d4d032fadf32f0845e103b3 /pygments/lexers/haskell.py
parent11dac32db5db1166b8d55dc85bc16d2085936c9a (diff)
downloadpygments-git-cffc5df62c258ca39fc7474f7197f2df33ab014f.tar.gz
all: move often-used "line_re" to pygments.lexer
Diffstat (limited to 'pygments/lexers/haskell.py')
-rw-r--r--pygments/lexers/haskell.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pygments/lexers/haskell.py b/pygments/lexers/haskell.py
index 2f03174f..1840a8b2 100644
--- a/pygments/lexers/haskell.py
+++ b/pygments/lexers/haskell.py
@@ -11,7 +11,7 @@
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, \
- default, include, inherit
+ default, include, inherit, line_re
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Generic, Whitespace
from pygments import unistring as uni
@@ -21,9 +21,6 @@ __all__ = ['HaskellLexer', 'HspecLexer', 'IdrisLexer', 'AgdaLexer', 'CryptolLexe
'LiterateCryptolLexer', 'KokaLexer']
-line_re = re.compile('.*?\n')
-
-
class HaskellLexer(RegexLexer):
"""
A Haskell lexer based on the lexemes defined in the Haskell 98 Report.