| 21 | |
| 22 | #[derive(Default, PartialEq, Serialize, Deserialize, Clone)] |
| 23 | pub struct Module { |
| 24 | /// Names declared in this module. This is the important thing. |
| 25 | pub names: HashMap<String, Decl>, |
| 26 | |
| 27 | /// List of relative paths to include in search path when doing lookup in |
| 28 | /// this module. |
| 29 | /// |
| 30 | /// Assuming we want to lookup `average`, which is in `std`. The root module |
| 31 | /// does not contain the `average`. So instead: |
| 32 | /// - look for `average` in root module and find nothing, |
| 33 | /// - follow redirects in root module, |
| 34 | /// - because of redirect `std`, so we look for `average` in `std`, |
| 35 | /// - there is `average` is `std`, |
| 36 | /// - result of the lookup is FQ ident `std.average`. |
| 37 | pub redirects: Vec<pl::Ident>, |
| 38 | |
| 39 | /// A declaration that has been shadowed (overwritten) by this module. |
| 40 | pub shadowed: Option<Box<Decl>>, |
| 41 | } |
| 42 | |
| 43 | /// A struct containing information about a single declaration. |
| 44 | #[derive(Debug, PartialEq, Default, Serialize, Deserialize, Clone)] |
no outgoing calls
no test coverage detected