dan-c-underwood / vscode-arm

Arm® Syntax highlighting for VSCode
MIT License
41 stars 19 forks source link

extension breaks inline assembly (C/C++) if semicolon is used #18

Open shuffle2 opened 4 years ago

shuffle2 commented 4 years ago
static void int_restore(const u32 int_state) {
    asm volatile(
        "msr    CPSR_c, %0;"
        :
        : "r" (int_state)
    );
}

This breaks C syntax highlighting for the rest of the file. The problem appears to be the ;. If it's escaped with \;, then highlighting works (for both arm and C) altho the compiler complains. Removing the ; solves the problem, but I think it's not compatible with all compiler versions. It would be nice to support this in the syntax highlighter.

dan-c-underwood commented 4 years ago

Hey - I think this might be related to #15. If you want to add your case to that issue and the linked issue?

shuffle2 commented 4 years ago

yea, interesting. i can confirm asm(";") similarly works as a minimal repro for this.

elupus commented 10 months ago

Still seem to be an issue. Took a while to figure out that this extension was the culprit.