Mono-D
Mono-D copied to clipboard
Inline assembly blocks break code folding
The following code results in a parser error, and as a consequence code folding breaks in the file:
ubyte add(ubyte a, ubyte b, int carry = 0) {
asm {
shr carry, 1;
mov AL, a;
adc AL, b;
mov a, AL;
setc ALU.c.offsetof[ECX];
seto ALU.v.offsetof[ECX];
}
return a;
}
Specifically, the setc ALU.c.offsetof[ECX]; and seto ALU.v.offsetof[ECX]; lines.
This is with version 2.13.5.
Hi, okay, never thought this sort of syntax was ever allowed, but well :)
Just so it's a little clearer, "ALU" is a type definition (class). "c" and "v" are fields in that class :)
Just thought I'd add this for the semantic parsing side of things.