Issue#1492: New rules to handle whitespace in array definitions#1495
Issue#1492: New rules to handle whitespace in array definitions#1495JHertz5 merged 9 commits intojeremiah-c-leary:masterfrom
Conversation
…onstrained array definitions.
…ed and unconstrained array definitions.
…ed and unconstrained array definitions.
|
I prefer no space before the parenthesis, so the default sounds good to me. --Jeremy |
|
I also think no space is a good default. I tried setting architecture a of b is
type my_array is array (natural range <>) of integer; -- OK, fixed to "array ("
type my_array2 is array (natural range 0 to 7) of std_logic_vector(7 downto 0); -- Wrong, fixed to "array("
begin
end architecture a; |
|
Hi @maltaisn. Thanks for taking a look at the branch. The reason that your code is not being fixed as you'd expect is because (unless I'm mistaken) you've only set the However I'm very glad that you raised this. In checking your query, I realised that there is an overlap between this PR and PR #1499. The |
|
Ah right I only set the unbounded one. Thanks! |
|
@maltaisn I've updated the branch with the newly merged rules from #1488. You should find that in your example snippet, |
|
It works. So the two following constructs:
Are now both handled by Not that it matters much. We currently do it like this in our codebase, but we can just use no space if that makes the rules more consistent. |
|
@maltaisn Excellent, thanks for checking! You are correct, |
|
No it's totally fine this way. Thank you for your work. |
|
@maltaisn Excellent, thanks! I'll merge this PR then. |
Resolve #1492.
Opinions may vary on whether the default should be
array(orarray (. I've gone for the former, but I'm happy to change that if requested.