summaryrefslogtreecommitdiff
path: root/pygments/lexers/julia.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/julia.py')
-rw-r--r--pygments/lexers/julia.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pygments/lexers/julia.py b/pygments/lexers/julia.py
index 1b7d543a..cf7c7d61 100644
--- a/pygments/lexers/julia.py
+++ b/pygments/lexers/julia.py
@@ -14,7 +14,7 @@ import re
from pygments.lexer import Lexer, RegexLexer, bygroups, combined, do_insertions
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Generic
-from pygments.util import shebang_matches
+from pygments.util import shebang_matches, unirange
__all__ = ['JuliaLexer', 'JuliaConsoleLexer']
@@ -30,6 +30,8 @@ class JuliaLexer(RegexLexer):
filenames = ['*.jl']
mimetypes = ['text/x-julia', 'application/x-julia']
+ flags = re.MULTILINE | re.UNICODE
+
builtins = [
'exit', 'whos', 'edit', 'load', 'is', 'isa', 'isequal', 'typeof', 'tuple',
'ntuple', 'uid', 'hash', 'finalizer', 'convert', 'promote', 'subtype',
@@ -89,7 +91,8 @@ class JuliaLexer(RegexLexer):
# names
(r'@[\w.]+', Name.Decorator),
- (r'[a-zA-Z_]\w*', Name),
+ (u'(?:[a-zA-Z_\u00A1-\uffff]|%s)(?:[a-zA-Z_0-9\u00A1-\uffff]|%s)*!*' %
+ ((unirange(0x10000, 0x10ffff),)*2), Name),
# numbers
(r'(\d+(_\d+)+\.\d*|\d*\.\d+(_\d+)+)([eEf][+-]?[0-9]+)?', Number.Float),