Skip to content

Commit e98ca04

Browse files
committed
Add first draft public API to navigate the design
1 parent 33f6388 commit e98ca04

File tree

4 files changed

+411
-1
lines changed

4 files changed

+411
-1
lines changed

vhdl_lang/src/analysis.rs

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ mod standard;
2626
mod static_expression;
2727
mod target;
2828

29+
// @TODO consider moving facade into analysis
30+
pub(crate) use {lock::ReadGuard, root::AnalysisData};
31+
2932
#[cfg(test)]
3033
pub(crate) mod tests;
3134
pub(crate) use root::{Library, LockedUnit};

vhdl_lang/src/analysis/root.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ impl Library {
261261
})
262262
}
263263

264+
// @TODO optimize O() complexity
264265
pub(crate) fn secondary_units<'a>(
265266
&'a self,
266267
primary: &'a Symbol,
267-
) -> impl Iterator<Item = &'a LockedUnit> {
268+
) -> impl Iterator<Item = &'a LockedUnit> + 'a {
268269
self.units.iter().filter_map(move |(key, value)| match key {
269270
UnitKey::Secondary(sym, _) if primary == sym => Some(value),
270271
_ => None,

0 commit comments

Comments
 (0)