Stan  2.14.0
probability, sampling & optimization
statement_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_STATEMENT_DEF_HPP
2 #define STAN_LANG_AST_NODE_STATEMENT_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 
6 namespace stan {
7  namespace lang {
8 
9  statement::statement() : statement_(nil()) { }
10 
12 
13  statement::statement(const nil& st) : statement_(st) { }
14 
16 
17  statement::statement(const assgn& st) : statement_(st) { }
18 
19  statement::statement(const sample& st) : statement_(st) { }
20 
22  : statement_(st) {
23  }
24 
26 
28 
30 
32 
34  : statement_(st) { }
35 
37 
39 
41 
43 
45 
48  return boost::apply_visitor(vis, statement_);
49  }
50 
51  }
52 }
53 #endif
AST node for print statements.
bool is_no_op_statement() const
Return true if the basic statement held by the variant type in this wrapper is the no-op statement...
Holder for local variable declarations and a sequence of statements.
Definition: statements.hpp:16
AST node for assignment to variable with multi-indexing.
Definition: assgn.hpp:15
AST node for the increment log prob (deprecated) and target increment statements. ...
Probability, optimization and sampling library.
AST node for the reject statement.
AST structure for break and continue statements.
statement_t statement_
The statement variant type held by this wrapper.
Definition: statement.hpp:194
AST node for sampling statements.
Definition: sample.hpp:17
statement()
Construct a default (nil) statement.
boost::variant< boost::recursive_wrapper< nil >, boost::recursive_wrapper< assignment >, boost::recursive_wrapper< assgn >, boost::recursive_wrapper< sample >, boost::recursive_wrapper< increment_log_prob_statement >, boost::recursive_wrapper< expression >, boost::recursive_wrapper< statements >, boost::recursive_wrapper< for_statement >, boost::recursive_wrapper< conditional_statement >, boost::recursive_wrapper< while_statement >, boost::recursive_wrapper< break_continue_statement >, boost::recursive_wrapper< print_statement >, boost::recursive_wrapper< reject_statement >, boost::recursive_wrapper< return_statement >, boost::recursive_wrapper< no_op_statement > > statement_t
The variant type of statements.
Definition: statement.hpp:48
AST node for representing while statements.
Visitor to determine if a statement is a no-op statement.
AST node for the no-operation statement.
AST node for the return statement.
The nil structure used as a placeholder for undefined or empty values in several structures.
Definition: nil.hpp:11
AST node for representing a for statement.
AST node for conditional statements.
AST node for assignment statements.
Definition: assignment.hpp:14

     [ Stan Home Page ] © 2011–2016, Stan Development Team.