better-cpp-syntax icon indicating copy to clipboard operation
better-cpp-syntax copied to clipboard

ASM will not end after '#'

Open yyjdelete opened this issue 2 years ago • 0 comments

Checklist

  • [x] This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"

The code with a problem is:

void xxx(void)
{
    asm volatile(
        "TST   lr, #0x4\n"
        "ITE   EQ\n"
        "MRSEQ r1, MSP\n"
        "MRSNE r1, PSP\n"
        ::: "r1");
    asm volatile(
        "LDR   r0, [r1, #24]\n"
        ::: "r0", "r1");
}

It looks like:

image

It should look like:

#number is a vaild format of const number in arm asm instead of comment, and at lastest asm highlight should end normally

yyjdelete avatar Oct 08 '23 02:10 yyjdelete