aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

Inline assembly blocks break code folding #629

Open ghost opened 8 years ago

ghost commented 8 years ago

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.

aBothe commented 8 years ago

Hi, okay, never thought this sort of syntax was ever allowed, but well :)

ghost commented 8 years ago

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.