www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [SAOC 2023] dfmt rewrite - Weekly update #17

reply Prajwal S N <snp dlang.org> writes:
Hi all,

This update marks the end of SAOC 2023. Across the course of this 
program, I worked on building a formatter akin to dfmt using the 
DMD frontend, and I must say I'm quite satisfied with the 
outcome. We've mostly managed to reproduce the original source 
code, formatted in a consistent manner. There are a few bugs in 
the implementation, and support for retaining comments is a work 
in progress (with a PR up in DMD too), but overall I would say 
the project has achieved what was intended - to design and 
implement a formatter which uses the same source of truth as the 
compiler in terms of language syntax and semantics.

Going forward, I'll be working on sorting out the smaller details 
and hopefully have dmdfmt integrated into the default set of 
packages for D soon. A big shoutout to everyone who supported me 
along the way - notably Razvan Nitu (my mentor), and also Jan 
Juritza, Max Haughton, and Andrew Cattermole.

I hope to share the finished project here soon, and until then, 
cheerio!
Jan 12
next sibling parent Emmanuel Danso Nyarko <emmankoko519 gmail.com> writes:
On Friday, 12 January 2024 at 16:22:57 UTC, Prajwal S N wrote:
 Hi all,

 This update marks the end of SAOC 2023. Across the course of 
 this program, I worked on building a formatter akin to dfmt 
 using the DMD frontend, and I must say I'm quite satisfied with 
 the outcome. We've mostly managed to reproduce the original 
 source code, formatted in a consistent manner. There are a few 
 bugs in the implementation, and support for retaining comments 
 is a work in progress (with a PR up in DMD too), but overall I 
 would say the project has achieved what was intended - to 
 design and implement a formatter which uses the same source of 
 truth as the compiler in terms of language syntax and semantics.

 [...]
Great Job done brother!
Jan 12
prev sibling next sibling parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
Very good work!
Jan 12
prev sibling parent zjh <fqbqrr 163.com> writes:
On Friday, 12 January 2024 at 16:22:57 UTC, Prajwal S N wrote:
 Hi all,
Nice.
Jan 12