Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions vhdl_lang/src/analysis/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ impl DesignRoot {
ItemAtCursor::search(self, source, cursor)
}

/// Search for the declaration at decl_pos and format it
pub fn format_declaration(&self, decl_pos: &SrcPos) -> Option<String> {
FormatDeclaration::search(self, decl_pos)
}

/// Search for all references to the declaration at decl_pos
pub fn find_all_references(&self, decl_pos: &SrcPos) -> Vec<SrcPos> {
FindAllReferences::search(self, decl_pos)
}
Expand Down
9 changes: 9 additions & 0 deletions vhdl_lang/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,13 @@ pub enum ObjectClass {
SharedVariable,
}

#[derive(PartialEq, Debug, Clone, Copy)]
pub enum InterfaceListType {
Port,
Generic,
Parameter,
}

#[derive(PartialEq, Debug, Clone)]
pub struct ObjectDeclaration {
pub class: ObjectClass,
Expand Down Expand Up @@ -583,6 +590,7 @@ pub struct InterfaceFileDeclaration {
/// LRM 6.5.2 Interface object declarations
#[derive(PartialEq, Debug, Clone)]
pub struct InterfaceObjectDeclaration {
pub list_type: InterfaceListType,
pub class: ObjectClass,
pub ident: Ident,
pub mode: Mode,
Expand Down Expand Up @@ -1105,6 +1113,7 @@ pub struct EntityDeclaration {
pub decl: Vec<Declaration>,
pub statements: Vec<LabeledConcurrentStatement>,
}

/// LRM 3.3 Architecture bodies
#[derive(PartialEq, Debug, Clone)]
pub struct ArchitectureBody {
Expand Down
Loading