summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey B. Arnold <jeffrey.arnold@gmail.com>2014-11-14 20:04:39 -0800
committerJeffrey B. Arnold <jeffrey.arnold@gmail.com>2014-11-14 20:04:39 -0800
commitfc5bf35d2c1b74fb0748687a0b7ffceb482f79c2 (patch)
tree0d2983cb4888a34cde250fb7dfbb8d0fa2bbe2cd
parent4550ef568a25ba93afec4ec82e7b2a6e2d70470d (diff)
downloadpygments-fc5bf35d2c1b74fb0748687a0b7ffceb482f79c2.tar.gz
adding reject statement to Stan example file
-rw-r--r--pygments/lexers/_stan_builtins.py30
-rw-r--r--tests/examplefiles/example.stan3
2 files changed, 23 insertions, 10 deletions
diff --git a/pygments/lexers/_stan_builtins.py b/pygments/lexers/_stan_builtins.py
index f9e331d3..fc2e1d71 100644
--- a/pygments/lexers/_stan_builtins.py
+++ b/pygments/lexers/_stan_builtins.py
@@ -10,7 +10,8 @@
:license: BSD, see LICENSE for details.
"""
-KEYWORDS = ( 'else',
+KEYWORDS = (
+ 'else',
'for',
'if',
'in',
@@ -20,9 +21,11 @@ KEYWORDS = ( 'else',
'print',
'reject',
'return',
- 'while')
+ 'while'
+)
-TYPES = ( 'cholesky_factor_corr',
+TYPES = (
+ 'cholesky_factor_corr',
'cholesky_factor_cov',
'corr_matrix',
'cov_matrix',
@@ -35,9 +38,11 @@ TYPES = ( 'cholesky_factor_corr',
'simplex',
'unit_vector',
'vector',
- 'void')
+ 'void'
+)
-FUNCTIONS = ( 'Phi',
+FUNCTIONS = (
+ 'Phi',
'Phi_approx',
'abs',
'acos',
@@ -367,9 +372,11 @@ FUNCTIONS = ( 'Phi',
'weibull_log',
'weibull_rng',
'wishart_log',
- 'wishart_rng')
+ 'wishart_rng'
+)
-DISTRIBUTIONS = ( 'bernoulli',
+DISTRIBUTIONS = (
+ 'bernoulli',
'bernoulli_logit',
'beta',
'beta_binomial',
@@ -418,9 +425,11 @@ DISTRIBUTIONS = ( 'bernoulli',
'uniform',
'von_mises',
'weibull',
- 'wishart')
+ 'wishart'
+)
-RESERVED = ( 'alignas',
+RESERVED = (
+ 'alignas',
'alignof',
'and',
'and_eq',
@@ -505,5 +514,6 @@ RESERVED = ( 'alignas',
'volatile',
'wchar_t',
'xor',
- 'xor_eq')
+ 'xor_eq'
+)
diff --git a/tests/examplefiles/example.stan b/tests/examplefiles/example.stan
index 716b4d12..69c9ac70 100644
--- a/tests/examplefiles/example.stan
+++ b/tests/examplefiles/example.stan
@@ -111,6 +111,9 @@ model {
print("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_~@#$%^&*`'-+={}[].,;: ");
print("Hello, world!");
print("");
+
+ // reject statement
+ reject("I just don't like it");
}
generated quantities {