generate_line_number.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_GENERATOR_GENERATE_LINE_NUMBER_HPP
2 #define STAN_LANG_GENERATOR_GENERATE_LINE_NUMBER_HPP
3 
4 #include <stan/lang/ast.hpp>
6 #include <ostream>
7 #include <vector>
8 
9 namespace stan {
10  namespace lang {
11 
12  /*
13  * Generate statement to update current line number in program.
14  *
15  * @param[in] line program node
16  * @param[in] indent indentation level
17  * @param[in,out] o stream for generating
18  */
19  template <typename T>
21  int indent, std::ostream& o) {
22  o << "current_statement_begin__ = " << line.begin_line_ << ";" << EOL;
23  }
24 
25  template void generate_line_number(const var_decl&,
26  int indent, std::ostream& o);
27 
28  template void generate_line_number(const statement&,
29  int indent, std::ostream& o);
30  }
31 }
32 #endif
double lang
Definition: runWimpSim.h:113
std::string indent(std::size_t const i)
void generate_line_number(const T &line, int indent, std::ostream &o)
const std::string EOL("\n")
double T
Definition: Xdiff_gwt.C:5