D-Scanner
D-Scanner copied to clipboard
Parsing broken on newest LDC
When I upgrade to the newest LDC version, parsing breaks in many ways. Here's a simple example:
import core.stdc.stdio : printf;
void f() {}
void main() {
printf("call f");
f();
}
If I run dub run dscanner -- --styleCheck a.d
I get:
a.d(0:0)[error]: Primary expression expected
a.d(0:0)[error]: Expected `}` instead of `EOF`
a.d(3:6)[warn]: Public declaration 'f' is undocumented.
(The third error is legitimate, the first two are wrong.)
My dub run dscanner -- --version
is v0.12.0
.
My ldc2 --version
is 1.29.0
. If I downgrade to 1.28.0
, I correctly get just the third error.
I don't know if the issue is that the newer compiler has a bug, or if d-scanner depends on a compiler-provided library that has changed..
I built dscanner on an M1 MacBook Pro, I do not get this error. This indicates it's probably related to https://github.com/dlang-community/libdparse/issues/457
IIRC This is fixed.