带有 gnatpp 查询的 Ada 代码布局
我正在尝试使用 gnatpp 来改进某些 ada 代码的布局,但是当重新格式化过程调用时,它将命名参数放在同一行上,而不是像我喜欢的那样放在单独的行上。我使用的开关是:
gnatpp $(INCLUDES) -A0 -aM -c0 -kL -nD -M128 -rf test.adb
我知道 -A0 应该关闭所有对齐问题...
知道我是如何误读它们的吗?
I am trying to use gnatpp to improve the layout of some ada code, however when reformatting procedure calls it is putting named parameters on the same line, rather than on separate lines as I prefer. The switches I am using are :
gnatpp $(INCLUDES) -A0 -aM -c0 -kL -nD -M128 -rf test.adb
I understand the -A0 should turn off all alignment issues...
Any idea how I am misreading them ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为对齐选项中的语言可能会让您有点困惑。
对齐选项的文档说:
您在这里必须意识到的是,文本试图描述这些开关对 gnatpp 的作用,而不是对您自己的源代码的作用。
因此,您通过设置
-A0
所做的并不是“关闭源代码中的所有对齐问题”,而是您正在禁用 gnatpp 中的所有代码,否则会查看并修复源代码的对齐方式。-A0
实际上是在告诉 gnatpp“请不要修改我的源代码的对齐方式。我喜欢它本来的样子。”将
-A0
从那里取出,看看您是否更喜欢结果。I think the language in the alignment options may be confusing you a little.
The docs for the alignment options say:
The thing you have to realise here is that the text is trying to describe what these switches are doing to gnatpp, not to your own source code.
So what you are doing by setting
-A0
is not "turning off all alignment issues" in your source code, but rather you are disabling all the code in gnatpp that would otherwise be looking at and fixing up your source code's alignment.-A0
is effectively you telling gnatpp "please don't touch the alignment of my source code. I like it just the way it is."Take that
-A0
out of there, and see if you like the result better.