Hi,
I want to add highlight to some variation of Assembler. It looks like this:
.data
tabA: .space 1040
sumB: .double 0.0
.text
sgei r30, r1, #1040
bnez r30, ExitA
.data
wspB: .double 2.2
.text
addi r1, r1, #8
The definitions: .data
, and .text
are starting sections where there are special rules inside.
I define following rules to get section of data and section of text
- comment: data section
name: entity.section
begin: ^\.data$
end: ^\.text$
patterns:
# rules related to data section
- comment: text section
name: entity.section
begin: ^\.text$
end: ^\.data$
patterns:
# rules related to text section
Unfortunately it does not highlight .text
section because begin: ^\.text$
is already consumed by end: ^\.text$
of previous section.
How to rematch end regexp in next rules.