I'm trying to pretty print some generated code from a tool I don't have control over. It generates comments using only a single space between the delimiter and the start of the comment. The style enforced by alire and gnat require two spaces. This seems like a good job for the pretty printer. However, it crashes immediately, even for the most basic example.
Here is a file (test.ads):
--
-- Test
--
package Test is end;
If I run the pretty printer on it using the following command:
I'm trying to pretty print some generated code from a tool I don't have control over. It generates comments using only a single space between the delimiter and the start of the comment. The style enforced by alire and gnat require two spaces. This seems like a good job for the pretty printer. However, it crashes immediately, even for the most basic example.
Here is a file (
test.ads
):If I run the pretty printer on it using the following command:
It just raises an exception and quits:
If you don't have the extra delimiters, it works fine:
I'm using version
23.0.0
of the tool: https://github.com/alire-project/alire-index/blob/stable-1.2.1/index/li/libadalang_tools/libadalang_tools-23.0.0.toml.It should handle the case where comments are surrounded by delimiters (unless it does and I'm missing a setting).