dan-c-underwood / vscode-arm

Arm® Syntax highlighting for VSCode
MIT License
40 stars 20 forks source link

Some conditional instructions not syntax-highlighted #10

Closed ketsuban closed 4 years ago

ketsuban commented 4 years ago

GNU as puts the condition code before the s in instructions which affect the status register, and the b and h in load/store byte/halfword instructions, and this plugin doesn't highlight them as instructions. It does highlight if you put the condition code at the end of the instruction (viz. lsrscc instead of lsrccs) so I'm guessing this is a depends-on-the-assembler thing - it'd be nice to get these highlighted as well.

dan-c-underwood commented 4 years ago

Hey, thanks for the report. I’ll take a look at this within the next week or so, but in principle happy to support the output of as.

dan-c-underwood commented 4 years ago

This should now work as requested in v1.0.0 🙂

I've done quite a major refactor of the language grammar - so please let me know if anything is behaving weirdly!

ketsuban commented 4 years ago

This seems to be a slight regression - now lsr isn't highlighted at all, regardless of the presence or absence of the s suffix or condition code. ldrheq is still highlighted, but ldreqh is not.

dan-c-underwood commented 4 years ago

Thanks for checking - I'll fix that now

dan-c-underwood commented 4 years ago

Regression should be fixed in v1.0.1 (a \ got missed as I was converting from normal regex to JSON string regexes!).

I'll sort the h flag shortly.

dan-c-underwood commented 4 years ago

ldr and str should now be behaving properly. Let me know if you spot any other issues or regressions. The grammars are a bit more maintainable now - but it has involved quite a bit of refactoring and I may not have caught everything!