[−][src]Trait moore_svlog_syntax::ast::AnyNodeData
Common details of an AST node.
Required methods
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
Describe this node for diagnostics in indefinite form, e.g. "entity".
This should not include any node name. Generally, we want to describe
the kind of node to the user, for example as in "cannot use
Provided methods
pub fn as_data(&self) -> &dyn AnyNodeData where
Self: Sized, [src]
Self: Sized,
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
Get this node's name, or None if it does not have one.
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
Describe this node for diagnostics in definite form, e.g. "entity 'top'".
If the node has a name, this should include it. Generally, we want to provide enough information for the user to pinpoint an exact node in their design.
pub fn format_indefinite(&self) -> FormatNodeIndefinite<'_> where
Self: Sized, [src]
Self: Sized,
Describe this node for diagnostics in indefinite form, e.g. "entity".
pub fn format_definite(&self) -> FormatNodeDefinite<'_> where
Self: Sized, [src]
Self: Sized,
Describe this node for diagnostics in definite form, e.g. "entity 'top'".
pub fn to_indefinite_string(&self) -> String where
Self: Sized, [src]
Self: Sized,
Describe this node for diagnostics in indefinite form, e.g. "entity".
pub fn to_definite_string(&self) -> String where
Self: Sized, [src]
Self: Sized,
Describe this node for diagnostics in definite form, e.g. "entity 'top'".
Implementors
impl AnyNodeData for ForeachIndexData[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl AnyNodeData for GenerateCaseData[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl AnyNodeData for ImportItemData[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for DataTypeData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for DpiDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ExprData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ItemData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ModportPortData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for PackedDimData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for PathSegmentData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for PatternFieldData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for PortConnData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for PortData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for TypeKindData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for TypeOrExpr<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for UnpackedDimData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for VarDimData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ClassDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ContAssignData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for EnumData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for EnumNameData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for GenerateBlockData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for GenerateForData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for GenerateIfData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for GenvarDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ImplicitDataTypeData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ImportDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for InstData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for InstNameData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for InterfaceData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ModportData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ModportNameData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ModportSimplePortData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ModuleData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for NetDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for PackageData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ParamDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ParamTypeDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ParamValueDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for PortDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for ProcedureData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for RootData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for SourceFileData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for StmtData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for StructData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for StructMemberData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for SubroutineDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for SubroutinePortData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for SubroutinePrototypeData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for TypeData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for TypedefData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for VarDeclData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a> AnyNodeData for VarDeclNameData<'a>[src]
pub fn get_name(&self) -> Option<Spanned<Name>>[src]
pub fn fmt_indefinite(&self, fmt: &mut Formatter<'_>) -> Result[src]
pub fn fmt_definite(&self, fmt: &mut Formatter<'_>) -> Result[src]
impl<'a, T> AnyNodeData for Node<'a, T> where
T: AnyNodeData, [src]
T: AnyNodeData,
Automatically implement AnyNodeData for Node<T> if the inner node
implements it.