bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for Dlang support] d: examples: fix coding style


From: Akim Demaille
Subject: Re: [PATCH for Dlang support] d: examples: fix coding style
Date: Sat, 7 Nov 2020 07:45:01 +0100

Hi Adela,

I can't install this patch, it was mangled by your mailer.  Please send
it as an attachment, or also provide a PR.

> Le 6 nov. 2020 à 16:52, Adela Vais <adela.vais99@gmail.com> a écrit :
> 
> Fixed whitespace issues and removed the @property attribute.
> * examples/d/calc/calc.y, examples/d/simple/calc.y: Here.

Make this:

* examples/d/calc/calc.y, examples/d/simple/calc.y: Fixe whitespace issues
and remove the @property attribute.


I use "here" when the commit title is clear enough, but if you
have to spell something different, do it with the file name,
and imperative.

> @@ -72,12 +72,12 @@ import std.range.primitives;
> import std.stdio;
> 
> auto calcLexer(R)(R range)
> -  if (isInputRange!R && is (ElementType!R : dchar))
> +if (isInputRange!R && is(ElementType!R : dchar))
> {
>   return new CalcLexer!R(range);
> }

I'm surprised by this.  That style came from H.S., and clearly
shows that that 'if' is compile-time, and controls the
availability of the function.

But you are right, the D coding style does not use indentation
here (https://dlang.org/dstyle.html#phobos_declarations).
I preferred H.S.'s style, but you're change is right.


Cheers!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]