From 432345601d1113ec16f11e766bbb50bc6d53236b Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Thu, 19 Feb 2026 12:21:58 +0100 Subject: [PATCH] Add isBit Signed-off-by: Ryszard Rozak --- src/V3AstAttr.h | 3 +++ src/V3AstNodeDType.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/V3AstAttr.h b/src/V3AstAttr.h index bfe9ba1fb..4fbc21571 100644 --- a/src/V3AstAttr.h +++ b/src/V3AstAttr.h @@ -574,6 +574,9 @@ public: || m_e == LONGINT || m_e == SHORTINT || m_e == UINT32 || m_e == UINT64 || m_e == TIME); } + bool isBit() const { + return m_e == BIT; + } bool isBitLogic() const { // Bit/logic vector types; can form a packed array return (m_e == LOGIC || m_e == BIT); } diff --git a/src/V3AstNodeDType.h b/src/V3AstNodeDType.h index 928402b2b..608ab7e1b 100644 --- a/src/V3AstNodeDType.h +++ b/src/V3AstNodeDType.h @@ -459,6 +459,7 @@ public: return m.m_keyword; } bool isBitLogic() const { return keyword().isBitLogic(); } + bool isBit() const { return keyword().isBit(); } bool isCHandle() const VL_MT_STABLE { return keyword().isCHandle(); } bool isDouble() const VL_MT_STABLE { return keyword().isDouble(); } bool isEvent() const VL_MT_STABLE { return keyword() == VBasicDTypeKwd::EVENT; }