gbdev/rgbds

Suggest corrections when invalid code is provided

Closed this issue · 2 comments

See ISSOtm/rsgbds#7 and ISSOtm/rsgbds#5.

Most of those are currently unparseable syntax errors. However, just as ld [hl], [hl] is unavoidable a valid parse but is still an error, so those could be too (with more helpful specific error messages).

Also, augmenting "Macro name not defined*" if it looks like "name EQU ..." etc sounds good.

Along the same lines, we could check gbdev and pret for frequently-asked questions -- like "I got this error, what does it mean" -- and improve those error messages to explain better or provide suggestions. (Section/bank overflows are a big one in pret; new devs also often don't understand "Expression must be 8-bit".)

I'm not sure we should add this after all; see ISSOtm/rsgbds#7 (comment). By that perspective, ld [hl], [hl] is an unfortunate edge case that we can't make into an outright parse error, not an indication that we should add even more of them.