diff options
author | Georg Brandl <georg@python.org> | 2017-01-22 19:04:18 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2017-01-22 19:04:18 +0100 |
commit | ca1677ff64a8bfe04f3dd26a3554b6c11db7ee7f (patch) | |
tree | 8da42151e1a8a5ef3c0a487f07eab6f6a536c62b | |
parent | db38eea4958d435e377b24bfada9abad98c6808a (diff) | |
download | pygments-ca1677ff64a8bfe04f3dd26a3554b6c11db7ee7f.tar.gz |
Housekeeping.
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | pygments/lexers/__init__.py | 2 | ||||
-rw-r--r-- | pygments/lexers/bibtex.py | 14 | ||||
-rw-r--r-- | pygments/lexers/capnproto.py | 11 | ||||
-rw-r--r-- | pygments/lexers/crystal.py | 37 | ||||
-rw-r--r-- | pygments/lexers/dsls.py | 6 | ||||
-rw-r--r-- | pygments/lexers/ezhil.py | 5 | ||||
-rw-r--r-- | pygments/lexers/hexdump.py | 28 | ||||
-rw-r--r-- | pygments/lexers/monte.py | 5 | ||||
-rw-r--r-- | pygments/lexers/rnc.py | 2 | ||||
-rw-r--r-- | pygments/lexers/verification.py | 2 | ||||
-rw-r--r-- | pygments/lexers/webmisc.py | 29 | ||||
-rw-r--r-- | pygments/lexers/whiley.py | 15 | ||||
-rw-r--r-- | pygments/styles/sas.py | 3 | ||||
-rw-r--r-- | pygments/styles/stata.py | 3 |
15 files changed, 99 insertions, 66 deletions
@@ -24,6 +24,9 @@ Version 2.2 * NCAR command language (PR#536) * Extempore (PR#530) * Cap'n Proto (PR#595) + * Whiley (PR#573) + * Monte (PR#592) + * Crystal (PR#576) - Added `lexers.find_lexer_class_by_name()`. (#1203) diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py index 7f0cb0b0..8ebf4dcc 100644 --- a/pygments/lexers/__init__.py +++ b/pygments/lexers/__init__.py @@ -72,7 +72,7 @@ def find_lexer_class(name): return cls -def find_lexer_class_by_name(alias): +def find_lexer_class_by_name(_alias): """Lookup a lexer class by alias. Like `get_lexer_by_name`, but does not instantiate the class. diff --git a/pygments/lexers/bibtex.py b/pygments/lexers/bibtex.py index cbaedca2..a6159f81 100644 --- a/pygments/lexers/bibtex.py +++ b/pygments/lexers/bibtex.py @@ -5,14 +5,16 @@ Lexers for BibTeX bibliography data and styles - :copyright: Copyright 2005-2015 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re -from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, default, words -from pygments.token import Name, Comment, String, Error, Number, Text, Keyword, Punctuation +from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, default, \ + words +from pygments.token import Name, Comment, String, Error, Number, Text, \ + Keyword, Punctuation __all__ = ['BibTeXLexer', 'BSTLexer'] @@ -57,7 +59,8 @@ class BibTeXLexer(ExtendedRegexLexer): ('@comment', Comment), ('@preamble', Name.Class, ('closing-brace', 'value', 'opening-brace')), ('@string', Name.Class, ('closing-brace', 'field', 'opening-brace')), - ('@' + IDENTIFIER, Name.Class, ('closing-brace', 'command-body', 'opening-brace')), + ('@' + IDENTIFIER, Name.Class, + ('closing-brace', 'command-body', 'opening-brace')), ('.+', Comment), ], 'opening-brace': [ @@ -127,7 +130,8 @@ class BSTLexer(RegexLexer): 'root': [ include('whitespace'), (words(['read', 'sort']), Keyword), - (words(['execute', 'integers', 'iterate', 'reverse', 'strings']), Keyword, ('group')), + (words(['execute', 'integers', 'iterate', 'reverse', 'strings']), + Keyword, ('group')), (words(['function', 'macro']), Keyword, ('group', 'group')), (words(['entry']), Keyword, ('group', 'group', 'group')), ], diff --git a/pygments/lexers/capnproto.py b/pygments/lexers/capnproto.py index 482a0987..49fd3d3a 100644 --- a/pygments/lexers/capnproto.py +++ b/pygments/lexers/capnproto.py @@ -11,9 +11,8 @@ import re -from pygments.lexer import RegexLexer, bygroups, words -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Literal +from pygments.lexer import RegexLexer +from pygments.token import Text, Comment, Keyword, Name, Literal __all__ = ['CapnProtoLexer'] @@ -30,7 +29,6 @@ class CapnProtoLexer(RegexLexer): flags = re.MULTILINE | re.UNICODE - tokens = { 'root': [ (r'#.*?$', Comment.Single), @@ -38,8 +36,9 @@ class CapnProtoLexer(RegexLexer): (r'=', Literal, 'expression'), (r':', Name.Class, 'type'), (r'\$', Name.Attribute, 'annotation'), - (r'(struct|enum|interface|union|import|using|const|annotation|extends|in|of|on|as|with|from|fixed)\b', - Keyword), + (r'(struct|enum|interface|union|import|using|const|annotation|' + r'extends|in|of|on|as|with|from|fixed)\b', + Keyword), (r'[a-zA-Z0-9_.]+', Name), (r'[^#@=:$a-zA-Z0-9_]+', Text), ], diff --git a/pygments/lexers/crystal.py b/pygments/lexers/crystal.py index 78c70b61..7aecaf3e 100644 --- a/pygments/lexers/crystal.py +++ b/pygments/lexers/crystal.py @@ -5,25 +5,22 @@ Lexer for Crystal. - :copyright: Copyright 2006-2016 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re -from pygments.lexer import Lexer, RegexLexer, ExtendedRegexLexer, include, \ - bygroups, default, LexerContext, do_insertions, words +from pygments.lexer import ExtendedRegexLexer, include, \ + bygroups, default, LexerContext, words from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Error, Generic -from pygments.util import shebang_matches + Number, Punctuation, Error __all__ = ['CrystalLexer'] line_re = re.compile('.*?\n') - - CRYSTAL_OPERATORS = [ '!=', '!~', '!', '%', '&&', '&', '**', '*', '+', '-', '/', '<=>', '<<', '<=', '<', '===', '==', '=~', '=', '>=', '>>', '>', '[]=', '[]?', '[]', '^', '||', '|', '~' @@ -33,6 +30,8 @@ CRYSTAL_OPERATORS = [ class CrystalLexer(ExtendedRegexLexer): """ For `Crystal <http://crystal-lang.org>`_ source code. + + .. versionadded:: 2.2 """ name = 'Crystal' @@ -48,9 +47,9 @@ class CrystalLexer(ExtendedRegexLexer): start = match.start(1) yield start, Operator, match.group(1) # <<-? - yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` - yield match.start(3), String.Delimiter, match.group(3) # heredoc name - yield match.start(4), String.Heredoc, match.group(4) # quote again + yield match.start(2), String.Heredoc, match.group(2) # quote ", ', ` + yield match.start(3), String.Delimiter, match.group(3) # heredoc name + yield match.start(4), String.Heredoc, match.group(4) # quote again heredocstack = ctx.__dict__.setdefault('heredocstack', []) outermost = not bool(heredocstack) @@ -211,17 +210,21 @@ class CrystalLexer(ExtendedRegexLexer): # macros (words(''' debugger record pp assert_responds_to spawn parallel - getter setter property delegate def_hash def_equals def_equals_and_hash forward_missing_to + getter setter property delegate def_hash def_equals def_equals_and_hash + forward_missing_to '''.split(), suffix=r'\b'), Name.Builtin.Pseudo), (r'getter[!?]|property[!?]|__(DIR|FILE|LINE)__\b', Name.Builtin.Pseudo), # builtins # http://crystal-lang.org/api/toplevel.html (words(''' Object Value Struct Reference Proc Class Nil Symbol Enum Void - Bool Number Int Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float Float32 Float64 Char String + Bool Number Int Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 + Float Float32 Float64 Char String Pointer Slice Range Exception Regex - Mutex StaticArray Array Hash Set Tuple Deque Box Process File Dir Time Channel Concurrent Scheduler - abort at_exit caller delay exit fork future get_stack_top gets lazy loop main p print printf puts + Mutex StaticArray Array Hash Set Tuple Deque Box Process File + Dir Time Channel Concurrent Scheduler + abort at_exit caller delay exit fork future get_stack_top gets + lazy loop main p print printf puts raise rand read_line sleep sprintf system with_color '''.split(), prefix=r'(?<!\.)', suffix=r'\b'), Name.Builtin), # normal heredocs @@ -301,7 +304,8 @@ class CrystalLexer(ExtendedRegexLexer): (r'\{%', String.Interpol, 'in-macro-control'), (r'\{\{', String.Interpol, 'in-macro-expr'), # attributes - (r'(@\[)(\s*)([A-Z]\w*)', bygroups(Operator, Text, Name.Decorator), 'in-attr'), + (r'(@\[)(\s*)([A-Z]\w*)', + bygroups(Operator, Text, Name.Decorator), 'in-attr'), # this is needed because Crystal attributes can look # like keywords (class) or like this: ` ?!? (words(CRYSTAL_OPERATORS, prefix=r'(\.|::)'), @@ -325,7 +329,8 @@ class CrystalLexer(ExtendedRegexLexer): ], 'classname': [ (r'[A-Z_]\w*', Name.Class), - (r'(\()(\s*)([A-Z_]\w*)(\s*)(\))', bygroups(Punctuation, Text, Name.Class, Text, Punctuation)), + (r'(\()(\s*)([A-Z_]\w*)(\s*)(\))', + bygroups(Punctuation, Text, Name.Class, Text, Punctuation)), default('#pop') ], 'in-intp': [ diff --git a/pygments/lexers/dsls.py b/pygments/lexers/dsls.py index 4044b7c5..a1426bd6 100644 --- a/pygments/lexers/dsls.py +++ b/pygments/lexers/dsls.py @@ -5,7 +5,7 @@ Lexers for various domain-specific languages. - :copyright: Copyright 2006-2016 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -581,7 +581,7 @@ class PanLexer(RegexLexer): 'if', 'for', 'with', 'else', 'type', 'bind', 'while', 'valid', 'final', 'prefix', 'unique', 'object', 'foreach', 'include', 'template', 'function', 'variable', 'structure', 'extensible', 'declaration'), - prefix=r'\b', suffix=r'\s*\b'), + prefix=r'\b', suffix=r'\s*\b'), Keyword), (words(( 'file_contents', 'format', 'index', 'length', 'match', 'matches', @@ -593,7 +593,7 @@ class PanLexer(RegexLexer): 'is_number', 'is_property', 'is_resource', 'is_string', 'to_boolean', 'to_double', 'to_long', 'to_string', 'clone', 'delete', 'exists', 'path_exists', 'if_exists', 'return', 'value'), - prefix=r'\b', suffix=r'\s*\b'), + prefix=r'\b', suffix=r'\s*\b'), Name.Builtin), (r'#.*', Comment), (r'\\[\w\W]', String.Escape), diff --git a/pygments/lexers/ezhil.py b/pygments/lexers/ezhil.py index 7a096888..ce1cdb2d 100644 --- a/pygments/lexers/ezhil.py +++ b/pygments/lexers/ezhil.py @@ -4,7 +4,7 @@ ~~~~~~~~~~~~~~~~~~~~~ Pygments lexers for Ezhil language. - + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -16,6 +16,7 @@ from pygments.token import String, Number, Punctuation, Operator __all__ = ['EzhilLexer'] + class EzhilLexer(RegexLexer): """ Lexer for `Ezhil, a Tamil script-based programming language <http://ezhillang.org>`_ @@ -62,7 +63,7 @@ class EzhilLexer(RegexLexer): (r'(?u)\d+', Number.Integer), ] } - + def __init__(self, **options): super(EzhilLexer, self).__init__(**options) self.encoding = options.get('encoding', 'utf-8') diff --git a/pygments/lexers/hexdump.py b/pygments/lexers/hexdump.py index 578a3590..cba49be7 100644 --- a/pygments/lexers/hexdump.py +++ b/pygments/lexers/hexdump.py @@ -9,8 +9,6 @@ :license: BSD, see LICENSE for details. """ -import re - from pygments.lexer import RegexLexer, bygroups, include from pygments.token import Text, Name, Number, String, Punctuation @@ -36,7 +34,7 @@ class HexdumpLexer(RegexLexer): * ``od -t x1z FILE`` * ``xxd FILE`` * ``DEBUG.EXE FILE.COM`` and entering ``d`` to the prompt. - + .. versionadded:: 2.1 """ name = 'Hexdump' @@ -48,12 +46,17 @@ class HexdumpLexer(RegexLexer): 'root': [ (r'\n', Text), include('offset'), - (r'('+hd+r'{2})(\-)('+hd+r'{2})', bygroups(Number.Hex, Punctuation, Number.Hex)), + (r'('+hd+r'{2})(\-)('+hd+r'{2})', + bygroups(Number.Hex, Punctuation, Number.Hex)), (hd+r'{2}', Number.Hex), - (r'(\s{2,3})(\>)(.{16})(\<)$', bygroups(Text, Punctuation, String, Punctuation), 'bracket-strings'), - (r'(\s{2,3})(\|)(.{16})(\|)$', bygroups(Text, Punctuation, String, Punctuation), 'piped-strings'), - (r'(\s{2,3})(\>)(.{1,15})(\<)$', bygroups(Text, Punctuation, String, Punctuation)), - (r'(\s{2,3})(\|)(.{1,15})(\|)$', bygroups(Text, Punctuation, String, Punctuation)), + (r'(\s{2,3})(\>)(.{16})(\<)$', + bygroups(Text, Punctuation, String, Punctuation), 'bracket-strings'), + (r'(\s{2,3})(\|)(.{16})(\|)$', + bygroups(Text, Punctuation, String, Punctuation), 'piped-strings'), + (r'(\s{2,3})(\>)(.{1,15})(\<)$', + bygroups(Text, Punctuation, String, Punctuation)), + (r'(\s{2,3})(\|)(.{1,15})(\|)$', + bygroups(Text, Punctuation, String, Punctuation)), (r'(\s{2,3})(.{1,15})$', bygroups(Text, String)), (r'(\s{2,3})(.{16}|.{20})$', bygroups(Text, String), 'nonpiped-strings'), (r'\s', Text), @@ -72,7 +75,8 @@ class HexdumpLexer(RegexLexer): (r'\n', Text), include('offset'), (hd+r'{2}', Number.Hex), - (r'(\s{2,3})(\|)(.{1,16})(\|)$', bygroups(Text, Punctuation, String, Punctuation)), + (r'(\s{2,3})(\|)(.{1,16})(\|)$', + bygroups(Text, Punctuation, String, Punctuation)), (r'\s', Text), (r'^\*', Punctuation), ], @@ -80,14 +84,16 @@ class HexdumpLexer(RegexLexer): (r'\n', Text), include('offset'), (hd+r'{2}', Number.Hex), - (r'(\s{2,3})(\>)(.{1,16})(\<)$', bygroups(Text, Punctuation, String, Punctuation)), + (r'(\s{2,3})(\>)(.{1,16})(\<)$', + bygroups(Text, Punctuation, String, Punctuation)), (r'\s', Text), (r'^\*', Punctuation), ], 'nonpiped-strings': [ (r'\n', Text), include('offset'), - (r'('+hd+r'{2})(\-)('+hd+r'{2})', bygroups(Number.Hex, Punctuation, Number.Hex)), + (r'('+hd+r'{2})(\-)('+hd+r'{2})', + bygroups(Number.Hex, Punctuation, Number.Hex)), (hd+r'{2}', Number.Hex), (r'(\s{19,})(.{1,20}?)$', bygroups(Text, String)), (r'(\s{2,3})(.{1,20})$', bygroups(Text, String)), diff --git a/pygments/lexers/monte.py b/pygments/lexers/monte.py index aa5c75f7..e18560b8 100644 --- a/pygments/lexers/monte.py +++ b/pygments/lexers/monte.py @@ -5,7 +5,7 @@ Lexer for the Monte programming language. - :copyright: Copyright 2016 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -43,7 +43,7 @@ _operators = [ _escape_pattern = ( r'(?:\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|' r'\\["\'\\bftnr])') -#_char = _escape_chars + [('.', String.Char)] +# _char = _escape_chars + [('.', String.Char)] _identifier = '[_a-zA-Z][_0-9a-zA-Z]*' _constants = [ @@ -75,6 +75,7 @@ _safeScope = [ 'makeBrandPair', 'makeLazySlot', 'safeScope', 'simple__quasiParser', ] + class MonteLexer(RegexLexer): """ Lexer for the `Monte <https://monte.readthedocs.io/>`_ programming language. diff --git a/pygments/lexers/rnc.py b/pygments/lexers/rnc.py index f60141e8..2f2aacdd 100644 --- a/pygments/lexers/rnc.py +++ b/pygments/lexers/rnc.py @@ -5,7 +5,7 @@ Lexer for Relax-NG Compact syntax - :copyright: Copyright 2016 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/verification.py b/pygments/lexers/verification.py index 1ffee0ab..5322e17f 100644 --- a/pygments/lexers/verification.py +++ b/pygments/lexers/verification.py @@ -5,7 +5,7 @@ Lexer for Intermediate Verification Languages (IVLs). - :copyright: Copyright 2006-2016 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/pygments/lexers/webmisc.py b/pygments/lexers/webmisc.py index 73668579..712c8246 100644 --- a/pygments/lexers/webmisc.py +++ b/pygments/lexers/webmisc.py @@ -358,8 +358,10 @@ class XQueryLexer(ExtendedRegexLexer): bygroups(Keyword, Text, Keyword), 'itemtype'), (r'(treat)(\s+)(as)\b', bygroups(Keyword, Text, Keyword), 'itemtype'), - (r'(case)(\s+)(' + stringdouble + ')', bygroups(Keyword, Text, String.Double), 'itemtype'), - (r'(case)(\s+)(' + stringsingle + ')', bygroups(Keyword, Text, String.Single), 'itemtype'), + (r'(case)(\s+)(' + stringdouble + ')', + bygroups(Keyword, Text, String.Double), 'itemtype'), + (r'(case)(\s+)(' + stringsingle + ')', + bygroups(Keyword, Text, String.Single), 'itemtype'), (r'(case|as)\b', Keyword, 'itemtype'), (r'(\))(\s*)(as)', bygroups(Punctuation, Text, Keyword), 'itemtype'), @@ -367,7 +369,8 @@ class XQueryLexer(ExtendedRegexLexer): (r'(for|let|previous|next)(\s+)(\$)', bygroups(Keyword, Text, Name.Variable), 'varname'), (r'(for)(\s+)(tumbling|sliding)(\s+)(window)(\s+)(\$)', - bygroups(Keyword, Text, Keyword, Text, Keyword, Text, Name.Variable), 'varname'), + bygroups(Keyword, Text, Keyword, Text, Keyword, Text, Name.Variable), + 'varname'), # (r'\)|\?|\]', Punctuation, '#push'), (r'\)|\?|\]', Punctuation), (r'(empty)(\s+)(greatest|least)', bygroups(Keyword, Text, Keyword)), @@ -417,17 +420,21 @@ class XQueryLexer(ExtendedRegexLexer): (r'preserve|no-preserve', Keyword), (r',', Punctuation), ], - 'annotationname':[ + 'annotationname': [ (r'\(:', Comment, 'comment'), (qname, Name.Decorator), (r'(\()(' + stringdouble + ')', bygroups(Punctuation, String.Double)), (r'(\()(' + stringsingle + ')', bygroups(Punctuation, String.Single)), - (r'(\,)(\s+)(' + stringdouble + ')', bygroups(Punctuation, Text, String.Double)), - (r'(\,)(\s+)(' + stringsingle + ')', bygroups(Punctuation, Text, String.Single)), + (r'(\,)(\s+)(' + stringdouble + ')', + bygroups(Punctuation, Text, String.Double)), + (r'(\,)(\s+)(' + stringsingle + ')', + bygroups(Punctuation, Text, String.Single)), (r'\)', Punctuation), (r'(\s+)(\%)', bygroups(Text, Name.Decorator), 'annotationname'), - (r'(\s+)(variable)(\s+)(\$)', bygroups(Text, Keyword.Declaration, Text, Name.Variable), 'varname'), - (r'(\s+)(function)(\s+)', bygroups(Text, Keyword.Declaration, Text), 'root') + (r'(\s+)(variable)(\s+)(\$)', + bygroups(Text, Keyword.Declaration, Text, Name.Variable), 'varname'), + (r'(\s+)(function)(\s+)', + bygroups(Text, Keyword.Declaration, Text), 'root') ], 'varname': [ (r'\(:', Comment, 'comment'), @@ -473,8 +480,10 @@ class XQueryLexer(ExtendedRegexLexer): bygroups(Keyword, Text, Keyword), 'singletype'), (r'(treat)(\s+)(as)', bygroups(Keyword, Text, Keyword)), (r'(instance)(\s+)(of)', bygroups(Keyword, Text, Keyword)), - (r'(case)(\s+)(' + stringdouble + ')', bygroups(Keyword, Text, String.Double), 'itemtype'), - (r'(case)(\s+)(' + stringsingle + ')', bygroups(Keyword, Text, String.Single), 'itemtype'), + (r'(case)(\s+)(' + stringdouble + ')', + bygroups(Keyword, Text, String.Double), 'itemtype'), + (r'(case)(\s+)(' + stringsingle + ')', + bygroups(Keyword, Text, String.Single), 'itemtype'), (r'case|as', Keyword, 'itemtype'), (r'(\))(\s*)(as)', bygroups(Operator, Text, Keyword), 'itemtype'), (ncname + r':\*', Keyword.Type, 'operator'), diff --git a/pygments/lexers/whiley.py b/pygments/lexers/whiley.py index 0795a030..0d0e8ab8 100644 --- a/pygments/lexers/whiley.py +++ b/pygments/lexers/whiley.py @@ -5,7 +5,7 @@ Lexers for the Whiley language. - :copyright: Copyright 2006-2016 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -19,6 +19,8 @@ __all__ = ['WhileyLexer'] class WhileyLexer(RegexLexer): """ Lexer for the Whiley programming language. + + .. versionadded:: 2.2 """ name = 'Whiley' filenames = ['*.whiley'] @@ -47,12 +49,10 @@ class WhileyLexer(RegexLexer): 'requires', 'ensures', 'where', 'assert', 'assume', 'all', 'no', 'some', 'in', 'is', 'new', 'throw', 'try', 'catch', 'debug', 'skip', 'fail', - 'finite', 'total', - ), suffix=r'\b'), Keyword.Reserved), + 'finite', 'total'), suffix=r'\b'), Keyword.Reserved), (words(( 'function', 'method', 'public', 'private', 'protected', - 'export', 'native', - ), suffix=r'\b'), Keyword.Declaration), + 'export', 'native'), suffix=r'\b'), Keyword.Declaration), # "constant" & "type" are not keywords unless used in declarations (r'(constant|type)(\s+)([a-zA-Z_]\w*)(\s+)(is)\b', bygroups(Keyword.Declaration, Text, Name, Text, Keyword.Reserved)), @@ -73,8 +73,7 @@ class WhileyLexer(RegexLexer): 'uint', 'nat', # whiley.lang.Any - 'toString', - ), suffix=r'\b'), Name.Builtin), + 'toString'), suffix=r'\b'), Name.Builtin), # byte literal (r'[01]+b', Number.Bin), @@ -99,7 +98,7 @@ class WhileyLexer(RegexLexer): # operators and punctuation (r'[{}()\[\],.;]', Punctuation), (u'[+\\-*/%&|<>^!~@=:?' - # unicode operators + # unicode operators u'\u2200\u2203\u2205\u2282\u2286\u2283\u2287' u'\u222A\u2229\u2264\u2265\u2208\u2227\u2228' u']', Operator), diff --git a/pygments/styles/sas.py b/pygments/styles/sas.py index 8b7fc56e..78686fc2 100644 --- a/pygments/styles/sas.py +++ b/pygments/styles/sas.py @@ -6,6 +6,9 @@ Style inspired by SAS' enhanced program editor. Note This is not meant to be a complete style. It's merely meant to mimic SAS' program editor syntax highlighting. + + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. """ from pygments.style import Style diff --git a/pygments/styles/stata.py b/pygments/styles/stata.py index 2d8abb7e..2b5f5edd 100644 --- a/pygments/styles/stata.py +++ b/pygments/styles/stata.py @@ -6,6 +6,9 @@ Style inspired by Stata's do-file editor. Note this is not meant to be a complete style. It's merely meant to mimic Stata's do file editor syntax highlighting. + + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. """ from pygments.style import Style |