AmiBlitz / AmiBlitz3

Complete package of AmiBlitz3 including all sources.
https://www.amiblitz.de/
123 stars 9 forks source link

Suggestion: Forbid lowercase keywords as labels #37

Open Nju79 opened 2 years ago

Nju79 commented 2 years ago

Hello,

I cross-develop with AmiBlitz by writing in VSCode (there is an obsolete addin for AmiBlitz2 which also works with AmiBlitz3). Sometimes it happens that I write keywords in lowercase that are not recognized as keywords in the AB3 IDE on the Amiga but as labels.

Example:

If condition ; code else ; code EndIf

The compiler recognizes the else as a label and compiles the code accordingly. Would it be possible for something like this to be reported by the compiler (as a warning or an error)?

honitos commented 2 years ago

There is no easy solution for this, as the preprocessor that replaces all Keywords with tokens is casesensitive. At the moment I have no suitable solution for this.

I'd like to have it case insensitive too, as I'd like to relabel some compiler directives like "Syntax", "optimize" and other to be written with capital letters...