aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/modeling.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/py3/pygments/lexers/modeling.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/py3/pygments/lexers/modeling.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/modeling.py44
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/modeling.py b/contrib/python/Pygments/py3/pygments/lexers/modeling.py
index d7d0a160e6..b00a7f10b3 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/modeling.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/modeling.py
@@ -12,7 +12,7 @@ import re
from pygments.lexer import RegexLexer, include, bygroups, using, default
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
- Number, Punctuation, Whitespace
+ Number, Punctuation, Whitespace
from pygments.lexers.html import HtmlLexer
from pygments.lexers import _stan_builtins
@@ -283,8 +283,8 @@ class StanLexer(RegexLexer):
"""Pygments Lexer for Stan models.
The Stan modeling language is specified in the *Stan Modeling Language
- User's Guide and Reference Manual, v2.17.0*,
- `pdf <https://github.com/stan-dev/stan/releases/download/v2.17.0/stan-reference-2.17.0.pdf>`__.
+ User's Guide and Reference Manual, v2.17.0*,
+ `pdf <https://github.com/stan-dev/stan/releases/download/v2.17.0/stan-reference-2.17.0.pdf>`__.
.. versionadded:: 1.6
"""
@@ -315,26 +315,26 @@ class StanLexer(RegexLexer):
'parameters', r'transformed\s+parameters',
'model', r'generated\s+quantities')),
bygroups(Keyword.Namespace, Text, Punctuation)),
- # target keyword
- (r'target\s*\+=', Keyword),
+ # target keyword
+ (r'target\s*\+=', Keyword),
# Reserved Words
(r'(%s)\b' % r'|'.join(_stan_builtins.KEYWORDS), Keyword),
# Truncation
(r'T(?=\s*\[)', Keyword),
# Data types
(r'(%s)\b' % r'|'.join(_stan_builtins.TYPES), Keyword.Type),
- # < should be punctuation, but elsewhere I can't tell if it is in
- # a range constraint
- (r'(<)(\s*)(upper|lower)(\s*)(=)',
- bygroups(Operator, Whitespace, Keyword, Whitespace, Punctuation)),
- (r'(,)(\s*)(upper)(\s*)(=)',
- bygroups(Punctuation, Whitespace, Keyword, Whitespace, Punctuation)),
+ # < should be punctuation, but elsewhere I can't tell if it is in
+ # a range constraint
+ (r'(<)(\s*)(upper|lower)(\s*)(=)',
+ bygroups(Operator, Whitespace, Keyword, Whitespace, Punctuation)),
+ (r'(,)(\s*)(upper)(\s*)(=)',
+ bygroups(Punctuation, Whitespace, Keyword, Whitespace, Punctuation)),
# Punctuation
- (r"[;,\[\]()]", Punctuation),
+ (r"[;,\[\]()]", Punctuation),
# Builtin
- (r'(%s)(?=\s*\()' % '|'.join(_stan_builtins.FUNCTIONS), Name.Builtin),
- (r'(~)(\s*)(%s)(?=\s*\()' % '|'.join(_stan_builtins.DISTRIBUTIONS),
- bygroups(Operator, Whitespace, Name.Builtin)),
+ (r'(%s)(?=\s*\()' % '|'.join(_stan_builtins.FUNCTIONS), Name.Builtin),
+ (r'(~)(\s*)(%s)(?=\s*\()' % '|'.join(_stan_builtins.DISTRIBUTIONS),
+ bygroups(Operator, Whitespace, Name.Builtin)),
# Special names ending in __, like lp__
(r'[A-Za-z]\w*__\b', Name.Builtin.Pseudo),
(r'(%s)\b' % r'|'.join(_stan_builtins.RESERVED), Keyword.Reserved),
@@ -343,18 +343,18 @@ class StanLexer(RegexLexer):
# Regular variable names
(r'[A-Za-z]\w*\b', Name),
# Real Literals
- (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?', Number.Float),
- (r'\.[0-9]+([eE][+-]?[0-9]+)?', Number.Float),
+ (r'[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?', Number.Float),
+ (r'\.[0-9]+([eE][+-]?[0-9]+)?', Number.Float),
# Integer Literals
- (r'[0-9]+', Number.Integer),
+ (r'[0-9]+', Number.Integer),
# Assignment operators
- (r'<-|(?:\+|-|\.?/|\.?\*|=)?=|~', Operator),
+ (r'<-|(?:\+|-|\.?/|\.?\*|=)?=|~', Operator),
# Infix, prefix and postfix operators (and = )
- (r"\+|-|\.?\*|\.?/|\\|'|\^|!=?|<=?|>=?|\|\||&&|%|\?|:", Operator),
+ (r"\+|-|\.?\*|\.?/|\\|'|\^|!=?|<=?|>=?|\|\||&&|%|\?|:", Operator),
# Block delimiters
(r'[{}]', Punctuation),
- # Distribution |
- (r'\|', Punctuation)
+ # Distribution |
+ (r'\|', Punctuation)
]
}