aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py2/pygments/lexers/r.py
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/python/Pygments/py2/pygments/lexers/r.py
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py2/pygments/lexers/r.py')
-rw-r--r--contrib/python/Pygments/py2/pygments/lexers/r.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/python/Pygments/py2/pygments/lexers/r.py b/contrib/python/Pygments/py2/pygments/lexers/r.py
index ed7c21391f..8e7445995e 100644
--- a/contrib/python/Pygments/py2/pygments/lexers/r.py
+++ b/contrib/python/Pygments/py2/pygments/lexers/r.py
@@ -5,13 +5,13 @@
Lexers for the R/S languages.
- :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
-from pygments.lexer import Lexer, RegexLexer, include, do_insertions, bygroups
+from pygments.lexer import Lexer, RegexLexer, include, do_insertions, bygroups
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Generic
@@ -80,13 +80,13 @@ class SLexer(RegexLexer):
mimetypes = ['text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r',
'text/x-R', 'text/x-r-history', 'text/x-r-profile']
- valid_name = r'(?:`[^`\\]*(?:\\.[^`\\]*)*`)|(?:(?:[a-zA-z]|[_.][^0-9])[\w_.]*)'
+ valid_name = r'(?:`[^`\\]*(?:\\.[^`\\]*)*`)|(?:(?:[a-zA-z]|[_.][^0-9])[\w_.]*)'
tokens = {
'comments': [
(r'#.*$', Comment.Single),
],
'valid_name': [
- (valid_name, Name),
+ (valid_name, Name),
],
'punctuation': [
(r'\[{1,2}|\]{1,2}|\(|\)|;|,', Punctuation),
@@ -98,7 +98,7 @@ class SLexer(RegexLexer):
],
'operators': [
(r'<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\?', Operator),
- (r'\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}', Operator),
+ (r'\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}', Operator),
],
'builtin_symbols': [
(r'(NULL|NA(_(integer|real|complex|character)_)?|'
@@ -121,15 +121,15 @@ class SLexer(RegexLexer):
(r'\'', String, 'string_squote'),
(r'\"', String, 'string_dquote'),
include('builtin_symbols'),
- include('valid_name'),
+ include('valid_name'),
include('numbers'),
include('keywords'),
include('punctuation'),
include('operators'),
],
'root': [
- # calls:
- (r'(%s)\s*(?=\()' % valid_name, Name.Function),
+ # calls:
+ (r'(%s)\s*(?=\()' % valid_name, Name.Function),
include('statements'),
# blocks:
(r'\{|\}', Punctuation),
@@ -161,7 +161,7 @@ class RdLexer(RegexLexer):
This is a very minimal implementation, highlighting little more
than the macros. A description of Rd syntax is found in `Writing R
Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_
- and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_.
+ and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_.
.. versionadded:: 1.6
"""