Mono-D icon indicating copy to clipboard operation
Mono-D copied to clipboard

Inline assembly blocks break code folding

Open ghost opened this issue 10 years ago • 2 comments

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.

ghost avatar Oct 09 '15 04:10 ghost

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

aBothe avatar Oct 09 '15 19:10 aBothe

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.

ghost avatar Oct 09 '15 23:10 ghost