1 #ifndef STAN_LANG_AST_ORIGIN_BLOCK_HPP
2 #define STAN_LANG_AST_ORIGIN_BLOCK_HPP
3 
4 namespace stan {
5   namespace lang {
6     /**
7      * The type of a variable indicating where a variable was
8      * declared.   This is a typedef rather than an enum to get around
9      * forward declaration issues with enums in header files.
10      */
11     typedef int origin_block;
12 
13     /**
14      * Origin of variable is the name of the model.
15      */
16     const int model_name_origin = 0;
17 
18     /**
19      * The origin of the variable is the data block.
20      */
21     const int data_origin = 1;
22 
23     /**
24      * The origin of the variable is the transformed data block.
25      */
26     const int transformed_data_origin = 2;
27 
28     /**
29      * The origin of the variable is the parameter block.
30      */
31     const int parameter_origin = 3;
32 
33     /**
34      * The origin of the variable is the transformed parameter block.
35      */
36     const int transformed_parameter_origin = 4;
37 
38     /**
39      * The origin of the variable is generated quantities.
40      */
41     const int derived_origin = 5;
42 
43     /**
44      * The variable arose as a function argument to a non-void
45      * function that does not end in _lp or _rng.
46      */
47     const int function_argument_origin = 6;
48 
49     /**
50      * The variable arose as an argument to a non-void function with
51      * the _lp suffix.
52      */
53     const int function_argument_origin_lp = 7;
54 
55     /**
56      * The variable arose as an argument to a non-void function with
57      * the _rng suffix.
58      */
59     const int function_argument_origin_rng = 8;
60 
61     /**
62      * The variable arose as an argument to a function returning void
63      * that does not have the _lp or _rng suffix.
64      */
65     const int void_function_argument_origin = 9;
66 
67     /**
68      * The variable arose as an argument to a function returning void
69      * with _lp suffix.  function returning void
70      */
71     const int void_function_argument_origin_lp = 10;
72 
73     /**
74      * The variable arose as an argument to a function returning void
75      * with an _rng suffix.
76      */
77     const int void_function_argument_origin_rng = 11;
78 
79     /**
80      * The variable arose as a loop identifier
81      */
82     const int loop_identifier_origin = 12;
83 
84   }
85 }
86 #endif
87