xls
xls copied to clipboard
DSLX formatter removes comments around proc channel declarations
Describe the bug After running through dslx autofmt, the comments describing a channel declaration are gone.
To Reproduce Steps to reproduce the behavior:
- Take the example adder proc in the proc tutorial and add comments above each channel declaration.
pub proc adder {
// foo
A: chan<u32> in;
// bar
B: chan<u32> in;
// baz
C: chan<u32> out;
- Run the formatter or dslx_fmt_test.
- You will see the comments removed; test diff shown below:
< // foo
< A: chan<u32> in;
< // bar
< B: chan<u32> in;
< // baz
< C: chan<u32> out;
---
> A: chan<u32> in;
> B: chan<u32> in;
> C: chan<u32> out;
Expected behavior Comments should be preserved.
Note inline comments and blank lines (between comment and declaration, or between declarations) doesn't seem to workaround this issue.
We think this should be fixed by #1535