Closed ltrzesniewski closed 1 year ago
@dgrunwald could you please review this? @siegfriedpammer isn't sure.
If you put the longer keyword at a higher position in the xshd file it would work too, no?
If you put the longer keyword at a higher position in the xshd file it would work too, no?
Yes, I just tried it. Fixes the problem as well... this change is not strictly required, but might be good to use the same logic in both cases.
Yes, that's a workaround, but I wanted to fix the root cause. If this PR ends up not being accepted, I'll submit a fix to ILSpy directly.
The current behavior surprised me, as I expected the xshd keywords to behave like a set: their order shouldn't matter. In the ILSpy case, the presence of prefix IL instructions such as tail.
(with the dot at the end) changes the behavior of the whole keyword list.
I noticed the following issue in ILSpy:
Note that
clt
is highlighted instead ofclt.un
.This PR fixes this by making sure longer keywords are always preferred. Currently, this logic is only applied if every keyword in the list starts and ends with an alphanumeric character.