summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/functional.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
index 04863b97..d4f9a32c 100644
--- a/pygments/lexers/functional.py
+++ b/pygments/lexers/functional.py
@@ -1696,7 +1696,7 @@ class ElixirLexer(RegexLexer):
r'defp|def|defprotocol|defimpl|defrecord|defmacro|defdelegate|'
r'defexception|exit|raise|throw)\b(?![?!])|'
r'(?<!\.)\b(do|\-\>)\b\s*', Keyword),
- (r'\b(import|require|use|recur|quote|unquote|super)\b(?![?!])',
+ (r'\b(import|require|use|recur|quote|unquote|super|refer)\b(?![?!])',
Keyword.Namespace),
(r'(?<!\.)\b(and|not|or|when|xor|in)\b', Operator.Word),
(r'%=|\*=|\*\*=|\+=|\-=|\^=|\|\|=|'
@@ -1707,11 +1707,9 @@ class ElixirLexer(RegexLexer):
r'<=>|&&?|%\(\)|%\[\]|%\{\}|\+\+?|\-\-?|\|\|?|\!|//|[%&`/\|]|'
r'\*\*?|=?~|<\-)|([a-zA-Z_]\w*([?!])?)(:)(?!:)', String.Symbol),
(r':"', String.Symbol, 'interpoling_symbol'),
- (r'\b(nil|true|false)\b(?![?!])', Name.Constant),
- (r'\b[A-Z]\w*\b', Name.Constant),
- (r'\b(__(FILE|LINE|MODULE|STOP_ITERATOR|EXCEPTION|OP|REF|FUNCTION|'
- r'BLOCK|KVBLOCK)__)\b(?![?!])', Name.Builtin.Pseudo),
- (r'[a-zA-Z_!]\w*[!\?]?', Name),
+ (r'\b(nil|true|false)\b(?![?!])|\b[A-Z]\w*\b', Name.Constant),
+ (r'\b(__(FILE|LINE|MODULE|LOCAL|MAIN|FUNCTION)__)\b(?![?!])', Name.Builtin.Pseudo),
+ (r'[a-zA-Z_!][\w_]*[!\?]?', Name),
(r'[(){};,/\|:\\\[\]]', Punctuation),
(r'@[a-zA-Z_]\w*|&\d', Name.Variable),
(r'\b(0[xX][0-9A-Fa-f]+|\d(_?\d)*(\.(?![^\d\s])'