[−][src]Struct open_vaf::ir::ast::Ast
An Ast representing a parsed Verilog-AMS project (root file); It provides stable indicies for every Node because the entire Tree is immutable once created; It uses preallocated constant size arrays for performance
Fields
branches: IndexVec<BranchId, AttributeNode<BranchDeclaration>>
nets: IndexVec<NetId, AttributeNode<Net>>
ports: IndexVec<PortId, AttributeNode<Port>>
variables: IndexVec<VariableId, AttributeNode<Variable>>
parameters: IndexVec<ParameterId, AttributeNode<Parameter>>
modules: IndexVec<ModuleId, AttributeNode<Module>>
functions: IndexVec<FunctionId, AttributeNode<Function>>
disciplines: IndexVec<DisciplineId, AttributeNode<Discipline>>
natures: IndexVec<NatureId, AttributeNode<Nature>>
expressions: IndexVec<ExpressionId, Node<Expression>>
blocks: IndexVec<BlockId, AttributeNode<SeqBlock>>
attributes: IndexVec<AttributeId, Attribute>
statements: IndexVec<StatementId, Statement>
top_symbols: SymbolTable
Implementations
impl Ast
[src]
impl Ast
[src]
pub fn lower(self) -> Result<Hir, (Vec<Error>, Self)>
[src]
Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability
pub fn lower_with_decl_handler(
self,
declaration_handler: &mut impl DeclarationHandler
) -> Result<Hir, (Vec<Error>, Self)>
[src]
self,
declaration_handler: &mut impl DeclarationHandler
) -> Result<Hir, (Vec<Error>, Self)>
Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability
pub fn lower_and_print_errors(
self,
source_map: &SourceMap,
translate_lines: bool
) -> Option<Hir>
[src]
self,
source_map: &SourceMap,
translate_lines: bool
) -> Option<Hir>
Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability and printing any errors or warnings that might occur
pub fn lower_and_print_errors_with_var_decl_handle(
self,
source_map: &SourceMap,
translate_lines: bool,
declaration_handler: &mut impl DeclarationHandler
) -> Option<Hir>
[src]
self,
source_map: &SourceMap,
translate_lines: bool,
declaration_handler: &mut impl DeclarationHandler
) -> Option<Hir>
Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability and printing any errors or warnings that might occur
impl Ast
[src]
pub fn parse_from<'source_map, 'lt>(
&'lt mut self,
main_file: &Path,
source_map_allocator: &'source_map Bump
) -> Result<(&'source_map SourceMap<'source_map>, Vec<Error>, Vec<Warning>)>
[src]
&'lt mut self,
main_file: &Path,
source_map_allocator: &'source_map Bump
) -> Result<(&'source_map SourceMap<'source_map>, Vec<Error>, Vec<Warning>)>
The main point of this module. Parses a verilog-ams source file into an ast and returns any errors that occur
Arguments
-
main_file
- The Verilog-A source file to parse -
source_map_allocator
- A bump allocator that will be used to allocate the source map. (Bump::new()
can be used to create one)
Returns
- An Io Error if the
main_file
could not be read - A
SourceMap
of the parsed file generated during parsing - A list of all Errors that occurred during parsing
- A list of all Warnings generated during parsing
pub fn parse_from_and_print_errors<'source_map, 'lt>(
&'lt mut self,
main_file: &Path,
source_map_allocator: &'source_map Bump,
translate_lines: bool
) -> Option<&'source_map SourceMap<'source_map>>
[src]
&'lt mut self,
main_file: &Path,
source_map_allocator: &'source_map Bump,
translate_lines: bool
) -> Option<&'source_map SourceMap<'source_map>>
Parses a verilog-ams source file into an ast and prints any errors that occur
Arguments
-
main_file
- The Verilog-A source file to parse -
source_map_allocator
- A bump allocator that will be used to allocate the source map. (Bump::new()
can be used to create one) -
translate_lines
- When this is set to true the line numbers of printed errors are translated to reflect the line in the original source file instead of the source that was expanded by the preprocessor
Returns
- Parse successful - A Source Map of the parsed source
- Errors occurred during - Prints the errors and returns
None
Trait Implementations
impl Index<AttributeId> for Ast
[src]
type Output = Attribute
The returned type after indexing.
fn index(&self, index: AttributeId) -> &Self::Output
[src]
impl Index<BlockId> for Ast
[src]
type Output = AttributeNode<SeqBlock>
The returned type after indexing.
fn index(&self, index: BlockId) -> &Self::Output
[src]
impl Index<BranchId> for Ast
[src]
type Output = AttributeNode<BranchDeclaration>
The returned type after indexing.
fn index(&self, index: BranchId) -> &Self::Output
[src]
impl Index<DisciplineId> for Ast
[src]
type Output = AttributeNode<Discipline>
The returned type after indexing.
fn index(&self, index: DisciplineId) -> &Self::Output
[src]
impl Index<ExpressionId> for Ast
[src]
type Output = Node<Expression>
The returned type after indexing.
fn index(&self, index: ExpressionId) -> &Self::Output
[src]
impl Index<FunctionId> for Ast
[src]
type Output = AttributeNode<Function>
The returned type after indexing.
fn index(&self, index: FunctionId) -> &Self::Output
[src]
impl Index<IdRange<AttributeId>> for Ast
[src]
type Output = IndexSlice<AttributeId, [Attribute]>
The returned type after indexing.
fn index(&self, range: IdRange<AttributeId>) -> &Self::Output
[src]
impl Index<IdRange<BlockId>> for Ast
[src]
type Output = IndexSlice<BlockId, [AttributeNode<SeqBlock>]>
The returned type after indexing.
fn index(&self, range: IdRange<BlockId>) -> &Self::Output
[src]
impl Index<IdRange<BranchId>> for Ast
[src]
type Output = IndexSlice<BranchId, [AttributeNode<BranchDeclaration>]>
The returned type after indexing.
fn index(&self, range: IdRange<BranchId>) -> &Self::Output
[src]
impl Index<IdRange<DisciplineId>> for Ast
[src]
type Output = IndexSlice<DisciplineId, [AttributeNode<Discipline>]>
The returned type after indexing.
fn index(&self, range: IdRange<DisciplineId>) -> &Self::Output
[src]
impl Index<IdRange<ExpressionId>> for Ast
[src]
type Output = IndexSlice<ExpressionId, [Node<Expression>]>
The returned type after indexing.
fn index(&self, range: IdRange<ExpressionId>) -> &Self::Output
[src]
impl Index<IdRange<FunctionId>> for Ast
[src]
type Output = IndexSlice<FunctionId, [AttributeNode<Function>]>
The returned type after indexing.
fn index(&self, range: IdRange<FunctionId>) -> &Self::Output
[src]
impl Index<IdRange<ModuleId>> for Ast
[src]
type Output = IndexSlice<ModuleId, [AttributeNode<Module>]>
The returned type after indexing.
fn index(&self, range: IdRange<ModuleId>) -> &Self::Output
[src]
impl Index<IdRange<NatureId>> for Ast
[src]
type Output = IndexSlice<NatureId, [AttributeNode<Nature>]>
The returned type after indexing.
fn index(&self, range: IdRange<NatureId>) -> &Self::Output
[src]
impl Index<IdRange<NetId>> for Ast
[src]
type Output = IndexSlice<NetId, [AttributeNode<Net>]>
The returned type after indexing.
fn index(&self, range: IdRange<NetId>) -> &Self::Output
[src]
impl Index<IdRange<ParameterId>> for Ast
[src]
type Output = IndexSlice<ParameterId, [AttributeNode<Parameter>]>
The returned type after indexing.
fn index(&self, range: IdRange<ParameterId>) -> &Self::Output
[src]
impl Index<IdRange<PortId>> for Ast
[src]
type Output = IndexSlice<PortId, [AttributeNode<Port>]>
The returned type after indexing.
fn index(&self, range: IdRange<PortId>) -> &Self::Output
[src]
impl Index<IdRange<StatementId>> for Ast
[src]
type Output = IndexSlice<StatementId, [Statement]>
The returned type after indexing.
fn index(&self, range: IdRange<StatementId>) -> &Self::Output
[src]
impl Index<IdRange<VariableId>> for Ast
[src]
type Output = IndexSlice<VariableId, [AttributeNode<Variable>]>
The returned type after indexing.
fn index(&self, range: IdRange<VariableId>) -> &Self::Output
[src]
impl Index<ModuleId> for Ast
[src]
type Output = AttributeNode<Module>
The returned type after indexing.
fn index(&self, index: ModuleId) -> &Self::Output
[src]
impl Index<NatureId> for Ast
[src]
type Output = AttributeNode<Nature>
The returned type after indexing.
fn index(&self, index: NatureId) -> &Self::Output
[src]
impl Index<NetId> for Ast
[src]
type Output = AttributeNode<Net>
The returned type after indexing.
fn index(&self, index: NetId) -> &Self::Output
[src]
impl Index<ParameterId> for Ast
[src]
type Output = AttributeNode<Parameter>
The returned type after indexing.
fn index(&self, index: ParameterId) -> &Self::Output
[src]
impl Index<PortId> for Ast
[src]
type Output = AttributeNode<Port>
The returned type after indexing.
fn index(&self, index: PortId) -> &Self::Output
[src]
impl Index<Range<AttributeId>> for Ast
[src]
type Output = IndexSlice<AttributeId, [Attribute]>
The returned type after indexing.
fn index(&self, range: Range<AttributeId>) -> &Self::Output
[src]
impl Index<Range<BlockId>> for Ast
[src]
type Output = IndexSlice<BlockId, [AttributeNode<SeqBlock>]>
The returned type after indexing.
fn index(&self, range: Range<BlockId>) -> &Self::Output
[src]
impl Index<Range<BranchId>> for Ast
[src]
type Output = IndexSlice<BranchId, [AttributeNode<BranchDeclaration>]>
The returned type after indexing.
fn index(&self, range: Range<BranchId>) -> &Self::Output
[src]
impl Index<Range<DisciplineId>> for Ast
[src]
type Output = IndexSlice<DisciplineId, [AttributeNode<Discipline>]>
The returned type after indexing.
fn index(&self, range: Range<DisciplineId>) -> &Self::Output
[src]
impl Index<Range<ExpressionId>> for Ast
[src]
type Output = IndexSlice<ExpressionId, [Node<Expression>]>
The returned type after indexing.
fn index(&self, range: Range<ExpressionId>) -> &Self::Output
[src]
impl Index<Range<FunctionId>> for Ast
[src]
type Output = IndexSlice<FunctionId, [AttributeNode<Function>]>
The returned type after indexing.
fn index(&self, range: Range<FunctionId>) -> &Self::Output
[src]
impl Index<Range<ModuleId>> for Ast
[src]
type Output = IndexSlice<ModuleId, [AttributeNode<Module>]>
The returned type after indexing.
fn index(&self, range: Range<ModuleId>) -> &Self::Output
[src]
impl Index<Range<NatureId>> for Ast
[src]
type Output = IndexSlice<NatureId, [AttributeNode<Nature>]>
The returned type after indexing.
fn index(&self, range: Range<NatureId>) -> &Self::Output
[src]
impl Index<Range<NetId>> for Ast
[src]
type Output = IndexSlice<NetId, [AttributeNode<Net>]>
The returned type after indexing.
fn index(&self, range: Range<NetId>) -> &Self::Output
[src]
impl Index<Range<ParameterId>> for Ast
[src]
type Output = IndexSlice<ParameterId, [AttributeNode<Parameter>]>
The returned type after indexing.
fn index(&self, range: Range<ParameterId>) -> &Self::Output
[src]
impl Index<Range<PortId>> for Ast
[src]
type Output = IndexSlice<PortId, [AttributeNode<Port>]>
The returned type after indexing.
fn index(&self, range: Range<PortId>) -> &Self::Output
[src]
impl Index<Range<StatementId>> for Ast
[src]
type Output = IndexSlice<StatementId, [Statement]>
The returned type after indexing.
fn index(&self, range: Range<StatementId>) -> &Self::Output
[src]
impl Index<Range<VariableId>> for Ast
[src]
type Output = IndexSlice<VariableId, [AttributeNode<Variable>]>
The returned type after indexing.
fn index(&self, range: Range<VariableId>) -> &Self::Output
[src]
impl Index<StatementId> for Ast
[src]
type Output = Statement
The returned type after indexing.
fn index(&self, index: StatementId) -> &Self::Output
[src]
impl Index<VariableId> for Ast
[src]
type Output = AttributeNode<Variable>
The returned type after indexing.
fn index(&self, index: VariableId) -> &Self::Output
[src]
impl IndexMut<AttributeId> for Ast
[src]
fn index_mut(&mut self, index: AttributeId) -> &mut Self::Output
[src]
impl IndexMut<BlockId> for Ast
[src]
impl IndexMut<BranchId> for Ast
[src]
impl IndexMut<DisciplineId> for Ast
[src]
fn index_mut(&mut self, index: DisciplineId) -> &mut Self::Output
[src]
impl IndexMut<ExpressionId> for Ast
[src]
fn index_mut(&mut self, index: ExpressionId) -> &mut Self::Output
[src]
impl IndexMut<FunctionId> for Ast
[src]
fn index_mut(&mut self, index: FunctionId) -> &mut Self::Output
[src]
impl IndexMut<IdRange<AttributeId>> for Ast
[src]
fn index_mut(&mut self, range: IdRange<AttributeId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<BlockId>> for Ast
[src]
impl IndexMut<IdRange<BranchId>> for Ast
[src]
impl IndexMut<IdRange<DisciplineId>> for Ast
[src]
fn index_mut(&mut self, range: IdRange<DisciplineId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<ExpressionId>> for Ast
[src]
fn index_mut(&mut self, range: IdRange<ExpressionId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<FunctionId>> for Ast
[src]
fn index_mut(&mut self, range: IdRange<FunctionId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<ModuleId>> for Ast
[src]
impl IndexMut<IdRange<NatureId>> for Ast
[src]
impl IndexMut<IdRange<NetId>> for Ast
[src]
impl IndexMut<IdRange<ParameterId>> for Ast
[src]
fn index_mut(&mut self, range: IdRange<ParameterId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<PortId>> for Ast
[src]
impl IndexMut<IdRange<StatementId>> for Ast
[src]
fn index_mut(&mut self, range: IdRange<StatementId>) -> &mut Self::Output
[src]
impl IndexMut<IdRange<VariableId>> for Ast
[src]
fn index_mut(&mut self, range: IdRange<VariableId>) -> &mut Self::Output
[src]
impl IndexMut<ModuleId> for Ast
[src]
impl IndexMut<NatureId> for Ast
[src]
impl IndexMut<NetId> for Ast
[src]
impl IndexMut<ParameterId> for Ast
[src]
fn index_mut(&mut self, index: ParameterId) -> &mut Self::Output
[src]
impl IndexMut<PortId> for Ast
[src]
impl IndexMut<Range<AttributeId>> for Ast
[src]
fn index_mut(&mut self, range: Range<AttributeId>) -> &mut Self::Output
[src]
impl IndexMut<Range<BlockId>> for Ast
[src]
impl IndexMut<Range<BranchId>> for Ast
[src]
impl IndexMut<Range<DisciplineId>> for Ast
[src]
fn index_mut(&mut self, range: Range<DisciplineId>) -> &mut Self::Output
[src]
impl IndexMut<Range<ExpressionId>> for Ast
[src]
fn index_mut(&mut self, range: Range<ExpressionId>) -> &mut Self::Output
[src]
impl IndexMut<Range<FunctionId>> for Ast
[src]
fn index_mut(&mut self, range: Range<FunctionId>) -> &mut Self::Output
[src]
impl IndexMut<Range<ModuleId>> for Ast
[src]
impl IndexMut<Range<NatureId>> for Ast
[src]
impl IndexMut<Range<NetId>> for Ast
[src]
impl IndexMut<Range<ParameterId>> for Ast
[src]
fn index_mut(&mut self, range: Range<ParameterId>) -> &mut Self::Output
[src]
impl IndexMut<Range<PortId>> for Ast
[src]
impl IndexMut<Range<StatementId>> for Ast
[src]
fn index_mut(&mut self, range: Range<StatementId>) -> &mut Self::Output
[src]
impl IndexMut<Range<VariableId>> for Ast
[src]
fn index_mut(&mut self, range: Range<VariableId>) -> &mut Self::Output
[src]
impl IndexMut<StatementId> for Ast
[src]
fn index_mut(&mut self, index: StatementId) -> &mut Self::Output
[src]
impl IndexMut<VariableId> for Ast
[src]
fn index_mut(&mut self, index: VariableId) -> &mut Self::Output
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ast
impl Send for Ast
impl Sync for Ast
impl Unpin for Ast
impl UnwindSafe for Ast
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,