Skip to content

Commit

Permalink
Fix global.local labels not being recognized in expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
ISSOtm committed Mar 21, 2021
1 parent 2a6d8e5 commit f8a739e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ASM/RGBDS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1003,12 +1003,12 @@ contexts:
scope: constant.language.rgbds
- match: '\b(?i:_NARG)\b'
scope: variable.parameter.rgbds
- match: '{{symbol_name}}'
scope: meta.generic-name.rgbds
- match: '(?!{{reserved}}){{symbol_char}}*(\.){{symbol_char}}+'
scope: meta.generic-name.local.rgbds
captures:
1: punctuation.accessor.dot.rgbds
- match: '{{symbol_name}}'
scope: meta.generic-name.rgbds
- match: '\('
scope: punctuation.section.parens.begin.rgbds
push:
Expand Down
13 changes: 13 additions & 0 deletions ASM/syntax_test_RGBDS
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,16 @@ load union "...", romX

/* \1 */
; ^^ - variable.parameter.rgbds


ld a, SomeLabel.localPart
; ^^ variable.function.instruction.rgbds
; ^ keyword.other.register.rgbds
; ^ punctuation.separator.arguments.rgbds
; ^^^^^^^^^^^^^^^^^^^ meta.generic-name.local.rgbds

ld a, SomeLabel
; ^^ variable.function.instruction.rgbds
; ^ keyword.other.register.rgbds
; ^ punctuation.separator.arguments.rgbds
; ^^^^^^^^^ meta.generic-name.rgbds

0 comments on commit f8a739e

Please sign in to comment.