Type hinting cleanup

This commit is contained in:
Alex Mykyta
2025-03-03 21:36:57 -08:00
parent 0258cac186
commit 40687abd6b
13 changed files with 69 additions and 45 deletions

View File

@@ -136,7 +136,8 @@ class DecodeLogicGenerator(RDLForLoopGenerator):
def enter_AddressableComponent(self, node: 'AddressableNode') -> Optional[WalkerAction]:
super().enter_AddressableComponent(node)
if node.is_array:
if node.array_dimensions:
assert node.array_stride is not None
# Collect strides for each array dimension
current_stride = node.array_stride
strides = []
@@ -211,7 +212,7 @@ class DecodeLogicGenerator(RDLForLoopGenerator):
def exit_AddressableComponent(self, node: 'AddressableNode') -> None:
super().exit_AddressableComponent(node)
if not node.is_array:
if not node.array_dimensions:
return
for _ in node.array_dimensions: