diff options
author | tgingold <tgingold@users.noreply.github.com> | 2022-12-24 08:56:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-24 08:56:55 +0100 |
commit | 26bb3c572eaffafafd8de8ef09b8acc34f91656f (patch) | |
tree | 2d70696f4f8bb78f9a4fda7a6d596775fdf080cc /pyGHDL/dom/Misc.py | |
parent | 8845f761ed2299e595afd5eee2444fed7fb79639 (diff) | |
parent | 5d9897770cb16494c6379cce85ed5935532c0cd1 (diff) | |
download | ghdl-26bb3c572eaffafafd8de8ef09b8acc34f91656f.tar.gz ghdl-26bb3c572eaffafafd8de8ef09b8acc34f91656f.tar.bz2 ghdl-26bb3c572eaffafafd8de8ef09b8acc34f91656f.zip |
Merge pull request #2265 from Paebbels/paebbels/DOM-with-documentation
pyGHDL.dom with Documentation
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) |