aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/dotnet.py
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-09 14:39:19 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-09 14:39:19 +0300
commitc04b663c7bb4b750deeb8f48f620497ec13da8fa (patch)
tree151ebc8bfdd2ad918caf5e6e2d8013e14272ddf8 /contrib/python/Pygments/py3/pygments/lexers/dotnet.py
parent0d55ca22c507d18c2f35718687e0b06d9915397b (diff)
downloadydb-c04b663c7bb4b750deeb8f48f620497ec13da8fa.tar.gz
intermediate changes
ref:2d4f292087954c9344efdabb7b2a67f466263c65
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/dotnet.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/dotnet.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py
index c04d2a0a926..751fdae3aa3 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/dotnet.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/dotnet.py
@@ -4,7 +4,7 @@
Lexers for .net languages.
- :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
@@ -24,8 +24,7 @@ __all__ = ['CSharpLexer', 'NemerleLexer', 'BooLexer', 'VbNetLexer',
class CSharpLexer(RegexLexer):
"""
- For `C# <http://msdn2.microsoft.com/en-us/vcsharp/default.aspx>`_
- source code.
+ For C# source code.
Additional options accepted:
@@ -47,11 +46,12 @@ class CSharpLexer(RegexLexer):
"""
name = 'C#'
+ url = 'https://docs.microsoft.com/en-us/dotnet/csharp/'
aliases = ['csharp', 'c#', 'cs']
filenames = ['*.cs']
mimetypes = ['text/x-csharp'] # inferred
- flags = re.MULTILINE | re.DOTALL | re.UNICODE
+ flags = re.MULTILINE | re.DOTALL
# for the range of allowed unicode characters in identifiers, see
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
@@ -77,7 +77,7 @@ class CSharpLexer(RegexLexer):
(r'^([ \t]*)((?:' + cs_ident + r'(?:\[\])?\s+)+?)' # return type
r'(' + cs_ident + ')' # method name
r'(\s*)(\()', # signature start
- bygroups(Whitespace, using(this), Name.Function, Whitespace,
+ bygroups(Whitespace, using(this), Name.Function, Whitespace,
Punctuation)),
(r'^(\s*)(\[.*?\])', bygroups(Whitespace, Name.Attribute)),
(r'[^\S\n]+', Whitespace),
@@ -94,7 +94,7 @@ class CSharpLexer(RegexLexer):
r"[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?", Number),
(r'(#)([ \t]*)(if|endif|else|elif|define|undef|'
r'line|error|warning|region|endregion|pragma)\b(.*?)(\n)',
- bygroups(Comment.Preproc, Whitespace, Comment.Preproc,
+ bygroups(Comment.Preproc, Whitespace, Comment.Preproc,
Comment.Preproc, Whitespace)),
(r'\b(extern)(\s+)(alias)\b', bygroups(Keyword, Whitespace,
Keyword)),
@@ -140,7 +140,7 @@ class CSharpLexer(RegexLexer):
class NemerleLexer(RegexLexer):
"""
- For `Nemerle <http://nemerle.org>`_ source code.
+ For Nemerle source code.
Additional options accepted:
@@ -162,11 +162,12 @@ class NemerleLexer(RegexLexer):
"""
name = 'Nemerle'
+ url = 'http://nemerle.org'
aliases = ['nemerle']
filenames = ['*.n']
mimetypes = ['text/x-nemerle'] # inferred
- flags = re.MULTILINE | re.DOTALL | re.UNICODE
+ flags = re.MULTILINE | re.DOTALL
# for the range of allowed unicode characters in identifiers, see
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
@@ -206,7 +207,7 @@ class NemerleLexer(RegexLexer):
'splice-string2'),
(r'<#', String, 'recursive-string'),
- (r'(<\[)(\s*)(' + cs_ident + ':)?', bygroups(Keyword,
+ (r'(<\[)(\s*)(' + cs_ident + ':)?', bygroups(Keyword,
Whitespace, Keyword)),
(r'\]\>', Keyword),
@@ -317,10 +318,11 @@ class NemerleLexer(RegexLexer):
class BooLexer(RegexLexer):
"""
- For `Boo <http://boo.codehaus.org/>`_ source code.
+ For Boo source code.
"""
name = 'Boo'
+ url = 'https://github.com/boo-lang/boo'
aliases = ['boo']
filenames = ['*.boo']
mimetypes = ['text/x-boo']
@@ -384,12 +386,11 @@ class BooLexer(RegexLexer):
class VbNetLexer(RegexLexer):
"""
- For
- `Visual Basic.NET <http://msdn2.microsoft.com/en-us/vbasic/default.aspx>`_
- source code.
+ For Visual Basic.NET source code.
"""
name = 'VB.net'
+ url = 'https://docs.microsoft.com/en-us/dotnet/visual-basic/'
aliases = ['vb.net', 'vbnet']
filenames = ['*.vb', '*.bas']
mimetypes = ['text/x-vbnet', 'text/x-vba'] # (?)
@@ -559,12 +560,13 @@ class VbNetAspxLexer(DelegatingLexer):
# Very close to functional.OcamlLexer
class FSharpLexer(RegexLexer):
"""
- For the `F# language <https://fsharp.org/>`_ (version 3.0).
+ For the F# language (version 3.0).
.. versionadded:: 1.5
"""
name = 'F#'
+ url= 'https://fsharp.org/'
aliases = ['fsharp', 'f#']
filenames = ['*.fs', '*.fsi']
mimetypes = ['text/x-fsharp']
@@ -645,7 +647,7 @@ class FSharpLexer(RegexLexer):
(r'\b(%s)\b' % '|'.join(word_operators), Operator.Word),
(r'\b(%s)\b' % '|'.join(primitives), Keyword.Type),
(r'(#)([ \t]*)(if|endif|else|line|nowarn|light|\d+)\b(.*?)(\n)',
- bygroups(Comment.Preproc, Whitespace, Comment.Preproc,
+ bygroups(Comment.Preproc, Whitespace, Comment.Preproc,
Comment.Preproc, Whitespace)),
(r"[^\W\d][\w']*", Name),