Skip to content

Commit 09add86

Browse files
committed
Added AllName and AttributeSpecification.
1 parent eed7799 commit 09add86

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

doc/LanguageModel/DesignUnits.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ types). An entity's list of statements is called body items.
8383
def LibraryReferences(self) -> List[Library]:
8484
8585
@property
86-
def PackageReferences(self) -> List[UseStatement]:
86+
def PackageReferences(self) -> List[UseClause]:
8787
8888
@property
8989
def ContextReferences(self) -> List[Context]:
@@ -131,7 +131,7 @@ Package
131131
def LibraryReferences(self) -> List[Library]:
132132
133133
@property
134-
def PackageReferences(self) -> List[UseStatement]:
134+
def PackageReferences(self) -> List[UseClause]:
135135
136136
@property
137137
def ContextReferences(self) -> List[Context]:
@@ -178,7 +178,7 @@ Architeture
178178
def LibraryReferences(self) -> List[Library]:
179179
180180
@property
181-
def PackageReferences(self) -> List[UseStatement]:
181+
def PackageReferences(self) -> List[UseClause]:
182182
183183
@property
184184
def ContextReferences(self) -> List[Context]:
@@ -223,7 +223,7 @@ Package Body
223223
def LibraryReferences(self) -> List[Library]:
224224
225225
@property
226-
def PackageReferences(self) -> List[UseStatement]:
226+
def PackageReferences(self) -> List[UseClause]:
227227
228228
@property
229229
def ContextReferences(self) -> List[Context]:

pyVHDLModel/VHDLModel.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ def __str__(self):
301301
return str(self._prefix) + "'" + self._name
302302

303303

304+
@export
305+
class AllName(Name):
306+
def __init__(self, prefix: Name):
307+
super().__init__("all", prefix)
308+
309+
def __str__(self):
310+
return "all"
311+
304312
@export
305313
class Symbol(ModelEntity):
306314
_symbolName: Name
@@ -1748,6 +1756,14 @@ def SubType(self):
17481756
return self._subType
17491757

17501758

1759+
@export
1760+
class AttributeSpecification(ModelEntity):
1761+
_attribute: Name
1762+
1763+
def __init__(self, attribute: Name):
1764+
self._attribute = attribute
1765+
1766+
17511767
@export
17521768
class InterfaceItem:
17531769
"""
@@ -1883,12 +1899,12 @@ def Library(self) -> Union[None, LibraryOrSymbol]:
18831899

18841900

18851901
@export
1886-
class UseStatement(Reference):
1902+
class UseClause(Reference):
18871903
_library: Union[None, LibraryOrSymbol]
18881904
_package: 'Package'
18891905
_item: str
18901906

1891-
def __init__(self):
1907+
def __init__(self, name: Name):
18921908
super().__init__()
18931909

18941910
@property
@@ -1937,7 +1953,7 @@ class MixinDesignUnitWithContext:
19371953
A ``DesignUnitWithReferences`` is a base-class for all design units with contexts.
19381954
"""
19391955
_libraryReferences: List[LibraryStatement]
1940-
_packageReferences: List[UseStatement]
1956+
_packageReferences: List[UseClause]
19411957
_contextReferences: List['Context']
19421958

19431959
def __init__(self):
@@ -1950,7 +1966,7 @@ def LibraryReferences(self) -> List[LibraryStatement]:
19501966
return self._libraryReferences
19511967

19521968
@property
1953-
def PackageReferences(self) -> List[UseStatement]:
1969+
def PackageReferences(self) -> List[UseClause]:
19541970
return self._packageReferences
19551971

19561972
@property
@@ -1975,7 +1991,7 @@ class SecondaryUnit(DesignUnit):
19751991
@export
19761992
class Context(PrimaryUnit):
19771993
_libraryReferences: List[LibraryStatement]
1978-
_packageReferences: List[UseStatement]
1994+
_packageReferences: List[UseClause]
19791995

19801996
def __init__(self, name):
19811997
super().__init__(name)
@@ -1988,7 +2004,7 @@ def LibraryReferences(self) -> List[LibraryStatement]:
19882004
return self._libraryReferences
19892005

19902006
@property
1991-
def PackageReferences(self) -> List[UseStatement]:
2007+
def PackageReferences(self) -> List[UseClause]:
19922008
return self._packageReferences
19932009

19942010

0 commit comments

Comments
 (0)