Due to similarities in some mnemonics in the three languages asar supports, it makes impossible giving them different scopes with only using TextMate grammars (it'd be completely doable with semantic tokens). TextMate grammars works per line and its multiline support (begin/end, begin/while) gives unwanted highlights to already highlighted text, resulting in even worse regexes for the mnemonics themselves.
A proposed solution is to give EVERY mnemonic the same scope without any sort of diferentiation between 65c816, SPC700 and GSU, this will result in a few changes in the scopes in the 65c816 grammar rules:
keyword.asar.mnemonics.65c816 will disappear, instead we will have keyword.asar.mnemonics contaning every single mnemonic available, including the children scopes in keyword.asar.mnemonics.65c816 such as keyword.asar.mnemonics.stack.
These changes will also affect filenames! 65c816.tmLanguage, spc700.tmLanguage, spc700inline.tmLanguage and superfx.tmLanguage will be merged into mnemonics.tmLanguage and deleted once the merging is done.
If anyone has questions, comments or suggestions about the changes, ideas, scopes or anything post them here. I'll gladly accept any of that, especially if it's about SPC700 and GSU.
Due to similarities in some mnemonics in the three languages asar supports, it makes impossible giving them different scopes with only using TextMate grammars (it'd be completely doable with semantic tokens). TextMate grammars works per line and its multiline support (begin/end, begin/while) gives unwanted highlights to already highlighted text, resulting in even worse regexes for the mnemonics themselves.
A proposed solution is to give EVERY mnemonic the same scope without any sort of diferentiation between 65c816, SPC700 and GSU, this will result in a few changes in the scopes in the 65c816 grammar rules:
keyword.asar.mnemonics.65c816
will disappear, instead we will havekeyword.asar.mnemonics
contaning every single mnemonic available, including the children scopes inkeyword.asar.mnemonics.65c816
such askeyword.asar.mnemonics.stack
.These changes will also affect filenames!
65c816.tmLanguage
,spc700.tmLanguage
,spc700inline.tmLanguage
andsuperfx.tmLanguage
will be merged intomnemonics.tmLanguage
and deleted once the merging is done.Expected changes:
keyword.asar.mnemonics.65c816
->keyword.asar.mnemonics
keyword.asar.mnemonics.65c816.stack
->keyword.asar.mnemonics.stack
keyword.asar.mnemonics.65c816.return
->keyword.asar.mnemonics.return
keyword.asar.mnemonics.65c816.branch
->keyword.asar.mnemonics.branch
keyword.asar.mnemonics.65c816.status
->keyword.asar.mnemonics.status
keyword.asar.mnemonics.65c816.status.repsep
->keyword.asar.mnemonics.status.repsep
keyword.asar.mnemonics.65c816.length
->keyword.asar.mnemonics.length
keyword.asar.mnemonics.65c816.breakpoint
->keyword.asar.mnemonics.breakpoint
SPC700 specifications
.b
and.w
lenght defines, even if all of the mnemonics don't support these.GSU specifications
return
children scope.Possible new scopes
Note: Everything listed here will be under the
keyword.asar.mnemonics
parent to make this list less cluteredmath
: INC, DEC, ADC, ADD, SBC, SUB, MUL YA, MULT, UMULT, etcmath.multiplication
: MUL YA, MULT, UMULT, etcbitwise
: AND, ORA, OR, EOR, XOR, NOT, ASL, ROL, etcregs
: FROM, TO, WITH, MOVE (GSU specific)gsu
: CACHE, LOOP (GSU specific)nop
: NOPIf anyone has questions, comments or suggestions about the changes, ideas, scopes or anything post them here. I'll gladly accept any of that, especially if it's about SPC700 and GSU.