Conversation
When the identifier begins with 'l', `@PAGE` and `@PAGEOFF` matching failed. I think this was due to the PrivateGlobalPrefix AArch64Identifiers for MachO. Either way I don't think there's any context for `@PAGE` & `@PAGEOFF` that you wouldn't want to match?
| syntax match AArch64Modifier /@PAGE/ contained | ||
| syntax match AArch64Modifier /@PAGEOFF/ contained | ||
| syntax match AArch64Modifier /@PAGE/ | ||
| syntax match AArch64Modifier /@PAGEOFF/ |
There was a problem hiding this comment.
The reason that they are marked contained is because they are part of a symbol reference. You cannot simply use @PAGE. The contained was to indicate that this must be within another match. I think that the problem likely is with the way that symbols are being identified and might be a single letter thing.
There was a problem hiding this comment.
The reason that they are marked contained is because they are part of a symbol reference. You cannot simply use
@PAGE. Thecontainedwas to indicate that this must be within another match. I think that the problem likely is with the way that symbols are being identified and might be a single letter thing.
Yeah I think it's something to do with the MachO global private prefix match but I have 2am brain and can't seem to work out why (I'm not that familiar with vimscript syntax files).
Minimum case to replicate:
ADRP x1, higher_msg@PAGE ; Highlights correctly
ADD x1, x1, higher_msg@PAGEOFF ; Also highlights correctly
ADRP x2, lower_msg@PAGE ; Does not highlight correctly
ADD x2, x2, lower_msg@PAGEOFF ; Also does not highlight correctly
@PAGE&@PAGEOFFweren't matching on identifiers beginning with the letterl.There may be a better way to do this.