From fc5bf35d2c1b74fb0748687a0b7ffceb482f79c2 Mon Sep 17 00:00:00 2001 From: "Jeffrey B. Arnold" Date: Fri, 14 Nov 2014 20:04:39 -0800 Subject: adding reject statement to Stan example file --- pygments/lexers/_stan_builtins.py | 30 ++++++++++++++++++++---------- tests/examplefiles/example.stan | 3 +++ 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 { -- cgit v1.2.1