| Thread overview | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 05, 2012 dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? | ||||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 7/5/12 12:46 AM, Walter Bright wrote:
> It would be nice to have a D source code formatter. But it needs a
> champion. Who's up for it?
Yes please.
Andrei
| |||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote:
> It would be nice to have a D source code formatter. But it needs a champion. Who's up for it?
Doesn't that need a lexer and parser for D first (which I'd _love_ to do but just haven't had time to get around to)?
- Jonathan M Davis
| |||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 7/4/2012 10:22 PM, Jonathan M Davis wrote:
> On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote:
>> It would be nice to have a D source code formatter. But it needs a champion.
>> Who's up for it?
>
> Doesn't that need a lexer and parser for D first (which I'd _love_ to do but
> just haven't had time to get around to)?
Yes.
Or it could be written based on the .di generation logic, i.e. as part of dmd.
| |||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thursday, 5 July 2012 at 06:27:55 UTC, Walter Bright wrote:
> On 7/4/2012 10:22 PM, Jonathan M Davis wrote:
>> On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote:
>>> It would be nice to have a D source code formatter. But it needs a champion.
>>> Who's up for it?
>>
>> Doesn't that need a lexer and parser for D first (which I'd _love_ to do but
>> just haven't had time to get around to)?
>
> Yes.
>
> Or it could be written based on the .di generation logic, i.e. as part of dmd.
Personally I would rather see it as a separate tool.
D already gets a bit of bad publicity for having the compiler do too much stuff
that should be relegated to separate tools.
This is again another use case that would benefit from the "compiler as library".
| |||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most of the time what I want. Jens | |||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thursday, 5 July 2012 at 06:27:55 UTC, Walter Bright wrote:
> On 7/4/2012 10:22 PM, Jonathan M Davis wrote:
>> On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote:
>>> It would be nice to have a D source code formatter. But it needs a champion.
>>> Who's up for it?
>>
>> Doesn't that need a lexer and parser for D first (which I'd _love_ to do but
>> just haven't had time to get around to)?
>
> Yes.
>
> Or it could be written based on the .di generation logic, i.e. as part of dmd.
Somehow my reply seems to have been lost.
I find it nice, but would rather see it as a separate tool.
This are the type of projects that would benefit from having the compiler available as library.
--
Paulo
| |||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Paulo Pinto | On Thursday, July 05, 2012 11:11:28 Paulo Pinto wrote:
> This are the type of projects that would benefit from having the compiler available as library.
It will be eventually, but someone (or several someones) will have to take the time to do it. Once I find the time, I intend to port the lexer (and later parser) from dmd's frontend to D, and I intended to have it done quite some time ago, but I haven't had the time, so it hasn't happened yet, and no one else has taken the time to do that (or if they have, they haven't finished the job).
- Jonathan M Davis
| |||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
2012/7/5 Jens Mueller <jens.k.mueller@gmx.de>:
> Walter Bright wrote:
>> It would be nice to have a D source code formatter. But it needs a champion. Who's up for it?
>
> I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most
> of the time what I want.
>
> Jens
I'm using uncrustify too although it has the annoying habbit of rewriting => to = > causing all functions using the new lambda syntax to break.
| ||||
July 05, 2012 Re: dfmt - D source code formatter | ||||
|---|---|---|---|---|
| ||||
maarten van damme wrote:
> 2012/7/5 Jens Mueller <jens.k.mueller@gmx.de>:
> > Walter Bright wrote:
> >> It would be nice to have a D source code formatter. But it needs a champion. Who's up for it?
> >
> > I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most
> > of the time what I want.
> >
> > Jens
>
> I'm using uncrustify too although it has the annoying habbit of rewriting => to = > causing all functions using the new lambda syntax to break.
Have you tried adding an issue?
I had different problems. Most where fixed.
Jens
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply