From adaddb9516940186e65137c4c1c49d92036ca2f4 Mon Sep 17 00:00:00 2001 From: Aapo Saaristo Date: Mon, 20 May 2019 16:08:08 +0300 Subject: [PATCH] fix scoping of registers --- z80_rgbds.sublime-syntax | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/z80_rgbds.sublime-syntax b/z80_rgbds.sublime-syntax index 669f171..cf8ccc7 100644 --- a/z80_rgbds.sublime-syntax +++ b/z80_rgbds.sublime-syntax @@ -11,8 +11,10 @@ contexts: # stuff for the CPU - match: ^\s*(ld|ldi|ldd|ldh|push|pop|add|adc|sub|sbc|and|or|xor|cp|inc|dec|daa|cpl|rlca|rla|rrca|rra|rlc|rl|rrc|rr|sla|swap|sra|srl|bit|res|set|ccf|scf|nop|halt|stop|di|ei|jp|jr|call|ret|reti|rst) scope: keyword.rgbds - - match: (a|b|c|d|e|h|af|bc|de|hl|sp) - scope: variable.language.rgbds + - match: (af|bc|de|hl|sp|a|b|c|d|e|h)[\s,] + scope: source.rgbds + captures: + 1: variable.language.registers.rgbds # stuff for the assembler - match: (MACRO|ENDM|IF|ENDC|REPT|ENDR|DB|DW|DS|INCLUDE|INCBIN|SECTION|EQU|FAIL|PUSHO|OPT|WARN|SET|POPO)