diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2022-11-28 23:16:11 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2022-12-23 23:42:29 +0100 |
commit | 3a3e8e5fded027c1dc6e3566c5ad9a30e8bc5297 (patch) | |
tree | 150f8e74ef2490b930d70f0c32a72a701c9d3730 /pyGHDL/dom/Misc.py | |
parent | 93bf628dc6178674d01255b2b609245605b0aca4 (diff) | |
download | ghdl-3a3e8e5fded027c1dc6e3566c5ad9a30e8bc5297.tar.gz ghdl-3a3e8e5fded027c1dc6e3566c5ad9a30e8bc5297.tar.bz2 ghdl-3a3e8e5fded027c1dc6e3566c5ad9a30e8bc5297.zip |
Added handling of associated documentation comments.
Diffstat (limited to 'pyGHDL/dom/Misc.py')
-rw-r--r-- | pyGHDL/dom/Misc.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pyGHDL/dom/Misc.py b/pyGHDL/dom/Misc.py index d6fc08524..8f85db222 100644 --- a/pyGHDL/dom/Misc.py +++ b/pyGHDL/dom/Misc.py @@ -13,7 +13,7 @@ # # License: # ============================================================================ -# Copyright (C) 2019-2021 Tristan Gingold +# Copyright (C) 2019-2022 Tristan Gingold # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,22 +42,22 @@ from pyVHDLModel.SyntaxModel import ( ) from pyGHDL.libghdl._types import Iir from pyGHDL.dom import DOMMixin -from pyGHDL.dom._Utils import GetNameOfNode - +from pyGHDL.dom._Utils import GetNameOfNode, GetDocumentationOfNode __all__ = [] @export class Alias(VHDLModel_Alias, DOMMixin): - def __init__(self, node: Iir, aliasName: str): - super().__init__(aliasName) + def __init__(self, node: Iir, aliasName: str, documentation: str = None): + super().__init__(aliasName, documentation) DOMMixin.__init__(self, node) @classmethod - def parse(cls, node: Iir): - aliasName = GetNameOfNode(node) + def parse(cls, aliasNode: Iir): + aliasName = GetNameOfNode(aliasNode) + documentation = GetDocumentationOfNode(aliasNode) # FIXME: add an implementation - return cls(node, aliasName) + return cls(aliasNode, aliasName) |