summaryrefslogtreecommitdiff
path: root/pygments/lexers/erlang.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-11-06 14:00:28 +0100
committerGeorg Brandl <georg@python.org>2014-11-06 14:00:28 +0100
commitc863ac19ce4d591b93be8b36cb69b04422c8dc9f (patch)
tree98bd701a6fb0da18d92897960eabdd9a139ad7d4 /pygments/lexers/erlang.py
parent90fe03b0f663810f4b6718d89b5e830ec2c67960 (diff)
downloadpygments-c863ac19ce4d591b93be8b36cb69b04422c8dc9f.tar.gz
Simplify charclasses in the remaining modules
Diffstat (limited to 'pygments/lexers/erlang.py')
-rw-r--r--pygments/lexers/erlang.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py
index 6aa336db..563f7744 100644
--- a/pygments/lexers/erlang.py
+++ b/pygments/lexers/erlang.py
@@ -272,7 +272,7 @@ class ElixirLexer(RegexLexer):
(r'\{', r'\}', 'cb'),
(r'\[', r'\]', 'sb'),
(r'\(', r'\)', 'pa'),
- (r'\<', r'\>', 'ab'),
+ (r'<', r'>', 'ab'),
(r'/', r'/', 'slas'),
(r'\|', r'\|', 'pipe'),
('"', '"', 'quot'),
@@ -322,8 +322,8 @@ class ElixirLexer(RegexLexer):
op1_re = "|".join(re.escape(s) for s in OPERATORS1)
ops_re = r'(?:%s|%s|%s)' % (op3_re, op2_re, op1_re)
punctuation_re = "|".join(re.escape(s) for s in PUNCTUATION)
- alnum = '[A-Za-z_0-9]'
- name_re = r'(?:\.\.\.|[a-z_]%s*[!\?]?)' % alnum
+ alnum = '\w'
+ name_re = r'(?:\.\.\.|[a-z_]%s*[!?]?)' % alnum
modname_re = r'[A-Z]%(alnum)s*(?:\.[A-Z]%(alnum)s*)*' % {'alnum': alnum}
complex_name_re = r'(?:%s|%s|%s)' % (name_re, modname_re, ops_re)
special_atom_re = r'(?:\.\.\.|<<>>|%\{\}|%|\{\})'