MCPcopy Create free account
hub / github.com/PRQL/prql / Module

Class Module

prqlc/prqlc/src/ir/decl.rs:23–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22#[derive(Default, PartialEq, Serialize, Deserialize, Clone)]
23pub 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)]

Callers 6

new_rootMethod · 0.85
new_databaseMethod · 0.85
insert_frameMethod · 0.85
shadowMethod · 0.85
fold_statementsMethod · 0.85
defaultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected