1 #ifndef STAN_LANG_AST_VARIABLE_MAP_HPP 2 #define STAN_LANG_AST_VARIABLE_MAP_HPP 22 typedef std::pair<base_var_decl, var_origin>
range_t;
31 bool exists(
const std::string& name)
const;
86 void add(
const std::string& name,
97 void remove(
const std::string& name);
103 std::map<std::string, range_t>
map_;
Probability, optimization and sampling library.
std::pair< base_var_decl, var_origin > range_t
A variable type and the origin of its declaration.
void add(const std::string &name, const base_var_decl &base_decl, const var_origin &vo)
Add the specified declaration for a variable with the specified name originating in the specified blo...
int base_expr_type
The type of a base expression.
A map from function names to their base declarations and their origin.
bool exists(const std::string &name) const
Return true if a variable has been declared with the specified name.
std::size_t get_num_dims(const std::string &name) const
Return the number of dimensions declared for the variable with the specified name.
var_origin get_origin(const std::string &name) const
Return the origin of the variable declaration for the variable with the specified name...
int var_origin
The type of a variable indicating where a variable was declared.
AST base class for variable declarations, which share most of their structure.
std::map< std::string, range_t > map_
The stored map from function names to their declarations and origins.
base_expr_type get_base_type(const std::string &name) const
Return the type declared for the variable with the specified name.