summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorJeffrey B. Arnold <jeffrey.arnold@gmail.com>2013-02-07 02:27:40 -0500
committerJeffrey B. Arnold <jeffrey.arnold@gmail.com>2013-02-07 02:27:40 -0500
commitb35ff8d55fc717fe49e034bd202b6fe1b048abb2 (patch)
treeb8b8df770d2c30997010eb0f8b4662711f76dafd /pygments
parentf8d3d49805b9d81363812bbbdaae693658d442ef (diff)
downloadpygments-b35ff8d55fc717fe49e034bd202b6fe1b048abb2.tar.gz
update StanLexer to Stan 1.1.1, more
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/_stan_builtins.py85
-rw-r--r--pygments/lexers/math.py2
2 files changed, 86 insertions, 1 deletions
diff --git a/pygments/lexers/_stan_builtins.py b/pygments/lexers/_stan_builtins.py
index 6a5d1060..05432f85 100644
--- a/pygments/lexers/_stan_builtins.py
+++ b/pygments/lexers/_stan_builtins.py
@@ -21,6 +21,91 @@ CONSTANTS=[ u'e',
u'positive_infinity',
u'sqrt2']
+CPP_RESERVED=[ 'alignas',
+ 'alignof',
+ 'and',
+ 'and_eq',
+ 'asm',
+ 'auto',
+ 'bitand',
+ 'bitor',
+ 'bool',
+ 'break',
+ 'case',
+ 'catch',
+ 'char',
+ 'char16_t',
+ 'char32_t',
+ 'class',
+ 'compl',
+ 'const',
+ 'constexpr',
+ 'const_cast',
+ 'continue',
+ 'decltype',
+ 'default',
+ 'delete',
+ 'do',
+ 'double',
+ 'dynamic_cast',
+ 'else',
+ 'enum',
+ 'explicit',
+ 'export',
+ 'extern',
+ 'false',
+ 'float',
+ 'for',
+ 'friend',
+ 'goto',
+ 'if',
+ 'inline',
+ 'int',
+ 'long',
+ 'mutable',
+ 'namespace',
+ 'new',
+ 'noexcept',
+ 'not',
+ 'not_eq',
+ 'nullptr',
+ 'operator',
+ 'or',
+ 'or_eq',
+ 'private',
+ 'protected',
+ 'public',
+ 'register',
+ 'reinterpret_cast',
+ 'return',
+ 'short',
+ 'signed',
+ 'sizeof',
+ 'static',
+ 'static_assert',
+ 'static_cast',
+ 'struct',
+ 'switch',
+ 'template',
+ 'this',
+ 'thread_local',
+ 'throw',
+ 'true',
+ 'try',
+ 'typedef',
+ 'typeid',
+ 'typename',
+ 'union',
+ 'unsigned',
+ 'using',
+ 'virtual',
+ 'void',
+ 'volatile',
+ 'wchar_t',
+ 'while',
+ 'xor',
+ 'xor_eq']
+
FUNCTIONS=[ u'Phi',
u'Phi_approx',
u'abs',
diff --git a/pygments/lexers/math.py b/pygments/lexers/math.py
index c3dd90a6..531a2030 100644
--- a/pygments/lexers/math.py
+++ b/pygments/lexers/math.py
@@ -1352,7 +1352,7 @@ class StanLexer(RegexLexer):
% r'|'.join(_stan_builtins.CONSTANTS), Keyword.Constant),
# Special names ending in __, like lp__
(r'[A-Za-z][A-Za-z0-9_]*__\b', Name.Builtin.Pseudo),
- ('%s\b' % r'|'.join(_stan_builtins.CPP_RESERVED), Error),
+ ('%s\b' % r'|'.join(_stan_builtins.CPP_RESERVED), Keyword.Reserved),
# Regular variable names
(r'[A-Za-z][A-Za-z0-9_]*\b', Name),
# Real Literals