ThirdParty/Pygments/pygments/lexers/julia.py

changeset 4697
c2e9bf425554
parent 4172
4f20dba37ab6
child 5072
aab59042fefb
diff -r bf4d19a7cade -r c2e9bf425554 ThirdParty/Pygments/pygments/lexers/julia.py
--- a/ThirdParty/Pygments/pygments/lexers/julia.py	Sun Jan 24 16:15:58 2016 +0100
+++ b/ThirdParty/Pygments/pygments/lexers/julia.py	Sun Jan 24 19:28:37 2016 +0100
@@ -5,7 +5,7 @@
 
     Lexers for the Julia language.
 
-    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -14,7 +14,7 @@
 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 @@
     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 @@
 
             # 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),

eric ide

mercurial