summaryrefslogtreecommitdiff
path: root/pygments/lexers/functional.py
diff options
context:
space:
mode:
authorGaurav Jain <gaurav@gauravjain.org>2014-05-14 22:08:28 -0400
committerGaurav Jain <gaurav@gauravjain.org>2014-05-14 22:08:28 -0400
commit745f1e190950d2510aecc33de9f1727e24ddddf0 (patch)
treecf23557213ee9ab7b6cae7cfb30b54f92bdf9fc6 /pygments/lexers/functional.py
parent41dc0d839cbee3a6bde8511d6fe246503b605c66 (diff)
downloadpygments-745f1e190950d2510aecc33de9f1727e24ddddf0.tar.gz
Replace all occurences of [a-zA-Z0-9_] with \w
Diffstat (limited to 'pygments/lexers/functional.py')
-rw-r--r--pygments/lexers/functional.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
index af9918a0..9b977533 100644
--- a/pygments/lexers/functional.py
+++ b/pygments/lexers/functional.py
@@ -975,7 +975,7 @@ class HaskellLexer(RegexLexer):
],
'funclist': [
(r'\s+', Text),
- (r'[A-Z][a-zA-Z0-9_]*', Keyword.Type),
+ (r'[A-Z]\w*', Keyword.Type),
(r'(_[\w\']+|[a-z][\w\']*)', Name.Function),
(r'--(?![!#$%&*+./<=>?@\^|_~:\\]).*?$', Comment.Single),
(r'{-', Comment.Multiline, 'comment'),
@@ -1084,7 +1084,7 @@ class IdrisLexer(RegexLexer):
],
'funclist': [
(r'\s+', Text),
- (r'[A-Z][a-zA-Z0-9_]*', Keyword.Type),
+ (r'[A-Z]\w*', Keyword.Type),
(r'(_[\w\']+|[a-z][\w\']*)', Name.Function),
(r'--.*$', Comment.Single),
(r'{-', Comment.Multiline, 'comment'),
@@ -1801,9 +1801,9 @@ class ErlangLexer(RegexLexer):
'div', 'not', 'or', 'orelse', 'rem', 'xor'
]
- atom_re = r"(?:[a-z][a-zA-Z0-9_]*|'[^\n']*[^\\]')"
+ atom_re = r"(?:[a-z]\w*|'[^\n']*[^\\]')"
- variable_re = r'(?:[A-Z_][a-zA-Z0-9_]*)'
+ variable_re = r'(?:[A-Z_]\w*)'
escape_re = r'(?:\\(?:[bdefnrstv\'"\\/]|[0-7][0-7]?[0-7]?|\^[a-zA-Z]))'