AlchemicRaker / alchemy65

A vscode debugger extension for NES projects using cc65 and ca65.
MIT License
18 stars 4 forks source link

ca65 highlighting is broken for unary opcodes, unless you add extraneous whitespace #6

Open maxbane opened 2 years ago

maxbane commented 2 years ago

I think the \\b at the end of the opcode regexes in ca65.tmLanguage.json means that unary opcodes are only recognized and highlighted correctly if they are followed by extraneous whitespace. For some reason a newline alone doesn't trigger the \b word boundary?

For example, see this screenshot with the scope inspector active: https://i.imgur.com/GvrwOW9.png

Alt

Notice how unary opcodes like clc, dey, and rts are being classified as entity.other.attribute-name instead of the intended support.type, and are therefore being colored differently.

maxbane commented 2 years ago

P.S., this is even visible in the first video in the README -- notice clc is a different color than all the other opcodes :)