Skip to content

Commit 1a82a6b

Browse files
committed
Add signature to subprograms and enum literals.
1 parent b4953a5 commit 1a82a6b

14 files changed

+1064
-348
lines changed

vhdl_lang/src/analysis/analyze.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,6 @@ impl AnalysisError {
7272
}
7373
}
7474

75-
/// Converts an AnalysisResult to FatalNullResult
76-
macro_rules! ok_or_return {
77-
($result:ident, $diagnostics:ident) => {
78-
match $result {
79-
Ok(value) => value,
80-
Err(err) => {
81-
err.add_to($diagnostics)?;
82-
return Ok(());
83-
}
84-
}
85-
};
86-
}
87-
8875
pub(super) struct AnalyzeContext<'a> {
8976
root: &'a DesignRoot,
9077

@@ -197,7 +184,7 @@ impl<'a> AnalyzeContext<'a> {
197184
Ok(())
198185
}
199186

200-
fn is_standard_package(&self) -> bool {
187+
pub fn is_standard_package(&self) -> bool {
201188
*self.work_library_name() == self.std_sym
202189
&& *self.current_unit.primary_name() == self.standard_sym
203190
}

vhdl_lang/src/analysis/declarative.rs

+474-224
Large diffs are not rendered by default.

vhdl_lang/src/analysis/design_unit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl<'a> AnalyzeContext<'a> {
223223

224224
unit.entity_name.set_reference_pos(Some(entity.pos()));
225225

226-
let mut root_region = Region::with_parent(&entity.result().root_region);
226+
let mut root_region = Region::default().with_parent(&entity.result().root_region);
227227
self.analyze_context_clause(&mut root_region, &mut unit.context_clause, diagnostics)?;
228228
let mut region = Region::extend(&entity.result().region, Some(&root_region));
229229

@@ -266,7 +266,7 @@ impl<'a> AnalyzeContext<'a> {
266266

267267
unit.ident.set_reference_pos(Some(package.pos()));
268268
// @TODO make pattern of primary/secondary extension
269-
let mut root_region = Region::with_parent(&package.result().root_region);
269+
let mut root_region = Region::default().with_parent(&package.result().root_region);
270270
self.analyze_context_clause(&mut root_region, &mut unit.context_clause, diagnostics)?;
271271

272272
let mut region = Region::extend(&package.result().region, Some(&root_region));

0 commit comments

Comments
 (0)