diff options
Diffstat (limited to 'pyGHDL/dom')
-rw-r--r-- | pyGHDL/dom/Literal.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pyGHDL/dom/Literal.py b/pyGHDL/dom/Literal.py index 5fb31f0e7..26be52ec8 100644 --- a/pyGHDL/dom/Literal.py +++ b/pyGHDL/dom/Literal.py @@ -149,6 +149,10 @@ class StringLiteral(VHDLModel_StringLiteral, DOMMixin): @classmethod def parse(cls, literalNode: Iir) -> "StringLiteral": - stringID = nodes.Get_String8_Id(literalNode) - value = str_table.Get_String8_Ptr(stringID) - return cls(literalNode, value) + if nodes.Get_Bit_String_Base(literalNode) is nodes.NumberBaseType.Base_None: + value = str_table.Get_String8_Ptr( + nodes.Get_String8_Id(literalNode), nodes.Get_String_Length(literalNode) + ) + return cls(literalNode, value) + else: + print("[NOT IMPLEMENTED] Bit String Literal not supported yet") |