diff options
Diffstat (limited to 'pygments')
| -rw-r--r-- | pygments/lexers/functional.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index 9c010b1e..b307a7d7 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -3135,7 +3135,7 @@ def gen_elixir_string_rules(name, symbol, token): (r'[^#%s\\]+' % (symbol,), token), include('escapes'), (r'\\.', token), - (r'(%s)(:?)' % (symbol,), bygroups(token, Punctuation), "#pop"), + (r'(%s)' % (symbol,), bygroups(token), "#pop"), include('interpol') ] return states @@ -3186,13 +3186,13 @@ class ElixirLexer(RegexLexer): OPERATORS3 = ['<<<', '>>>', '|||', '&&&', '^^^', '~~~', '===', '!=='] OPERATORS2 = [ - '==', '!=', '<=', '>=', '&&', '||', '<>', '++', '--', '|>', '=~' + '==', '!=', '<=', '>=', '&&', '||', '<>', '++', '--', '|>', '=~', + '->', '<-', '|', '.', '%', '=' ] OPERATORS1 = ['<', '>', '+', '-', '*', '/', '!', '^', '&'] PUNCTUATION = [ - '\\\\', '<<', '>>', '::', '->', '<-', '=>', '|', '(', ')', - '{', '}', ';', ',', '.', '[', ']', '%', '=' + '\\\\', '<<', '>>', '=>', '(', ')', '{', '}', ':', ';', ',', '[', ']' ] def get_tokens_unprocessed(self, text): @@ -3295,6 +3295,10 @@ class ElixirLexer(RegexLexer): bygroups(String.Char, String.Escape)), (r'\?\\?.', String.Char), + # '::' has to go before atoms + (r':::', String.Symbol), + (r'::', Operator), + # atoms (r':' + special_atom_re, String.Symbol), (r':' + complex_name_re, String.Symbol), |
