DonaldHays / rgbds-vscode

Visual Studio Code language extension for RGBDS GBZ80 Assembly
MIT License
65 stars 9 forks source link

improve problem matcher #8

Closed jendrikw closed 4 years ago

DonaldHays commented 4 years ago

@jendrikw This is awesome!

I've been reviewing this pull request a bit with the latest RGBDS, and it looks good as far as I can tell.

I'm wondering about backwards compatibility with the old versions of RGBDS. As far as I can tell, your changes to the rgbasm matcher are compatible with older versions, but the rgblink changes aren't. But I think that would be an easy change by adding an optional non-capturing group around the new stuff, like ^(warning|error): (?:(?:.+ -> )*([^:]*)(::REPT~\\d+)?(::[^\\(]+)?\\(([0-9]+)\\): )?(.+)$, right? Do I have that right? What do you think?

jendrikw commented 4 years ago

I hadn't considered older versions, since I'm on 0.4.1. Making the additions optional with a non-capturing group seems to work.