Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"PORT" in the beginning of a VHDL generic name messes up the formatting with Standalone formatter #602

Open
am9417 opened this issue Apr 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@am9417
Copy link

am9417 commented Apr 10, 2024

Describe the bug
If there's a generic that has a string "PORT" in the identifier (e.g. "PORT_COUNT"), running the VHDL formatter with Standalone formatter breaks the file

To Reproduce
Format the following minimal VHDL entity in editor:

entity my_ent is
  generic (PORT_COUNT : natural);
  port(port_ena : bit_vector(PORT_COUNT-1 downto 0));
end entity;

Right click on file and click "Format document" or SHIFT + ALT + F

Expected to have nice formatting, but seems like the port inside a generic name (which should be completely fine!) breaks the formatting and gives a following "formatted" document as output, breaking the VHDL syntax completely.

entity my_ent is
  generic
  (
    port
    _COUNT : natural);
  port
  (
    port_ena : bit_vector(port
    _COUNT - 1 downto 0));
end entity;

Seems like the problem is if the generic starts with "PORT". E.g. "COUNT_PORT" does not trigger this error

Environment information:

  • Teros HDL: v5.0.12
  • VSCode version:
    • Version: 1.88.0 (user setup)
    • Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c
    • Date: 2024-04-03T13:26:18.741Z
    • Electron: 28.2.8
    • ElectronBuildId: 27744544
    • Chromium: 120.0.6099.291
    • Node.js: 18.18.2
    • V8: 12.0.267.19-electron.0
    • OS: Windows_NT x64 10.0.22631
@am9417 am9417 added the bug Something isn't working label Apr 10, 2024
@am9417 am9417 changed the title "PORT" in a VHDL generic name messes up the formatting with Standalone formatter "PORT" in the beginning of a VHDL generic name messes up the formatting with Standalone formatter Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant