g2384 / VHDLFormatter

VHDL formatter web online written in typescript
https://g2384.github.io/VHDLFormatter/
MIT License
51 stars 20 forks source link

Array type definiton breaks when formatting #21

Closed StathisDi closed 4 years ago

StathisDi commented 4 years ago

Array type definition breaks when formatting

If the Format Document function is used to format a code that includes an array type definition, the formatting process actually introduces errors to the type definition.

Report

For example:

Input

TYPE myType_ty IS ARRAY (NATURAL RANGE <>, NATURAL RANGE <>) OF std_logic_vector(5 DOWNTO 0);

Expected Behavior

TYPE myType_ty IS ARRAY (NATURAL RANGE <>, NATURAL RANGE <>) OF std_logic_vector(5 DOWNTO 0);

Actual Behavior

TYPE myType_ty IS ARRAY (NATURAL RANGE < >, NATURAL RANGE <>) OF std_logic_vector(5 DOWNTO 0);

The extra space between the < and > is a syntactical error in vhdl.