Libdparse needs to be updated to recognize AliasAssign declarations
WebFreak001
d.forum at webfreak.org
Tue May 4 14:07:47 UTC 2021
On Tuesday, 4 May 2021 at 12:10:55 UTC, RazvanN wrote:
> Hello fellow D people,
>
> Is there anyone in the community sufficiently familiar with
> libdparse [1] as to make it recognize an AliasAssign
> declaration [2]? Andralex has made a series of PRs to phobos
> that make use of the new technology. As a result the code is
> greatly simplified [3] and it comes with some memory savings
> [4]. However, these PRs are blocked because of the style
> checker that does not recognize alias assignments.
>
> If anyone with some experience with the libdparse repo would be
> able to fix this, that would be greatly appreciated!
>
> Cheers,
> RazvanN
>
> [1] https://github.com/dlang-community/libdparse
> [2] https://github.com/dlang/dmd/pull/11846
> [3] https://github.com/dlang/phobos/pull/8040
> [4] https://github.com/dlang/phobos/pull/8033
This code is fairly clear:
```d
alias A = B;
A = C;
```
however what about this code?
```d
void foo() {
alias A = B;
A = C;
}
```
is the `A = C` in this case an AliasAssign? how would the parser
differentiate between this AliasAssign and regular assignments?
More information about the Digitalmars-d
mailing list