diff options
Diffstat (limited to 'pyGHDL/dom/Object.py')
-rw-r--r-- | pyGHDL/dom/Object.py | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/pyGHDL/dom/Object.py b/pyGHDL/dom/Object.py index 3085f9f81..0358f716d 100644 --- a/pyGHDL/dom/Object.py +++ b/pyGHDL/dom/Object.py @@ -62,13 +62,9 @@ class Constant(VHDLModel_Constant, DOMMixin): subType: SubTypeOrSymbol, defaultExpression: Expression, ): - super().__init__(name) + super().__init__(name, subType, defaultExpression) DOMMixin.__init__(self, node) - self._name = name - self._subType = subType - self._defaultExpression = defaultExpression - @classmethod def parse(cls, constantNode: Iir) -> Union["Constant", "DeferredConstant"]: from pyGHDL.dom._Translate import ( @@ -90,12 +86,9 @@ class Constant(VHDLModel_Constant, DOMMixin): @export class DeferredConstant(VHDLModel_DeferredConstant, DOMMixin): def __init__(self, node: Iir, name: str, subType: SubTypeOrSymbol): - super().__init__(name) + super().__init__(name, subType) DOMMixin.__init__(self, node) - self._name = name - self._subType = subType - @classmethod def parse(cls, constantNode: Iir) -> "DeferredConstant": from pyGHDL.dom._Translate import GetSubTypeIndicationFromNode @@ -117,13 +110,9 @@ class Variable(VHDLModel_Variable, DOMMixin): subType: SubTypeOrSymbol, defaultExpression: Expression, ): - super().__init__(name) + super().__init__(name, subType, defaultExpression) DOMMixin.__init__(self, node) - self._name = name - self._subType = subType - self._defaultExpression = defaultExpression - @classmethod def parse(cls, variableNode: Iir) -> "Variable": from pyGHDL.dom._Translate import ( @@ -144,12 +133,9 @@ class Variable(VHDLModel_Variable, DOMMixin): @export class SharedVariable(VHDLModel_SharedVariable, DOMMixin): def __init__(self, node: Iir, name: str, subType: SubTypeOrSymbol): - super().__init__(name) + super().__init__(name, subType) DOMMixin.__init__(self, node) - self._name = name - self._subType = subType - @classmethod def parse(cls, variableNode: Iir) -> "SharedVariable": from pyGHDL.dom._Translate import GetSubTypeIndicationFromNode @@ -169,13 +155,9 @@ class Signal(VHDLModel_Signal, DOMMixin): subType: SubTypeOrSymbol, defaultExpression: Expression, ): - super().__init__(name) + super().__init__(name, subType, defaultExpression) DOMMixin.__init__(self, node) - self._name = name - self._subType = subType - self._defaultExpression = defaultExpression - @classmethod def parse(cls, signalNode: Iir) -> "Signal": from pyGHDL.dom._Translate import ( @@ -194,12 +176,9 @@ class Signal(VHDLModel_Signal, DOMMixin): @export class File(VHDLModel_File, DOMMixin): def __init__(self, node: Iir, name: str, subType: SubTypeOrSymbol): - super().__init__(name) + super().__init__(name, subType) DOMMixin.__init__(self, node) - self._name = name - self._subType = subType - @classmethod def parse(cls, fileNode: Iir) -> "File": from pyGHDL.dom._Translate import GetSubTypeIndicationFromNode |