Closed
Description
We need to create a stable public API to traverse the design hierarchy and the AST. I am hoping @Schottkyc137 and @skaupper can contribute their ideas and feedback here. My goal is to replace the Search
trait and the Visitor
trait with this implementation. First we need to gather some requirements than we can discuss the implementation.
Performance requirements
- Must not perform heap allocation
Public requirements
Library
- Must be able to get library by name
- Must be able to iterate over all libraries
Design units
- Must be able to iterate over all design units in a source file
- Must be able to get primary units from library by name
- Must be able to iterate over all primary units in a libary
- Must be able to iterate over secondary units of a primary unit
- Must be able to get context clause of a design unit
Declarations & Statements
- Must be able to iterate over all declarations, sequential statements, concurrent statements in a design unit
- Must be able to iterate over all declarations and statements nested within other declarations and statements
- Must be iterate over declarations and statements in the order they appear in the source file.
Navigation
- Get referenced named entity (
AnyEnt
) from source location - Get referenced design unit/statement/declaration in AST from named entity (
AnyEnt
) - Get all source locations referencing named entity (
AnyEnt
)
Private requirements
- Must be able to clear all references in the entire AST
Metadata
Metadata
Assignees
Labels
No labels