diff options
author | Georg Brandl <georg@python.org> | 2014-09-16 10:01:59 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-09-16 10:01:59 +0200 |
commit | 206f0e6e75a13b6e78989ef421835d70f80a26e2 (patch) | |
tree | 8317f11f5617c3fd48ad1a683e8036a3f7fa49d4 /pygments/lexers/math.py | |
parent | c75b6f25aeed25ffe8658d9f37614b1069cf299c (diff) | |
parent | 04682453bfada53ed746b306f7a8c0553c8610ab (diff) | |
download | pygments-206f0e6e75a13b6e78989ef421835d70f80a26e2.tar.gz |
Merged in jrnold/pygments-main-stan (pull request #377)
Updated StanLexer to Stan version 2.4.0
Diffstat (limited to 'pygments/lexers/math.py')
-rw-r--r-- | pygments/lexers/math.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/math.py b/pygments/lexers/math.py index b324c614..c51403e2 100644 --- a/pygments/lexers/math.py +++ b/pygments/lexers/math.py @@ -1572,8 +1572,8 @@ class JagsLexer(RegexLexer): 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.2.0*, - `pdf <https://github.com/stan-dev/stan/releases/download/v2.2.0/stan-reference-2.2.0.pdf>`__. + The Stan modeling language is specified in the *Stan Modeling Language User's Guide and Reference Manual, v2.4.0*, + `pdf <https://github.com/stan-dev/stan/releases/download/v2.4.0/stan-reference-2.4.0.pdf>`__. .. versionadded:: 1.6 """ @@ -1600,7 +1600,7 @@ class StanLexer(RegexLexer): include('whitespace'), # Block start (r'(%s)(\s*)({)' % - r'|'.join(('data', r'transformed\s+?data', + r'|'.join(('functions', 'data', r'transformed\s+?data', 'parameters', r'transformed\s+parameters', 'model', r'generated\s+quantities')), bygroups(Keyword.Namespace, Text, Punctuation)), @@ -1630,8 +1630,8 @@ class StanLexer(RegexLexer): # Assignment operators # SLexer makes these tokens Operators. (r'<-|~', Operator), - # Infix and prefix operators (and = ) - (r"\+|-|\.?\*|\.?/|\\|'|==?|!=?|<=?|>=?|\|\||&&", Operator), + # Infix, prefix and postfix operators (and = ) + (r"\+|-|\.?\*|\.?/|\\|'|\^|==?|!=?|<=?|>=?|\|\||&&", Operator), # Block delimiters (r'[{}]', Punctuation), ] |