-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
What are the conventions for syntax highlighting of BASIC code? While working on issue #20 (derived modes), I have run into a problem that I do not know the meaning of groupings like basic-builtin-regexp and basic-keyword-regexp.
If there is a "typical" convention, it would be helpful to have it in the comments in basic-mode.el. If there is not, and I suspect there isn't yet, it may be good to see what others have done and look at what makes sense.
Note that not all of the categories are confusing. Comments, constants, strings, and so on are self-explanatory. The ones that I'd like to get nailed down are:
- functions: this one seems to be for the keywords (like
SIN()) which return a value. The definition of it makes sense, but there is some question about whether things likePEEK()andTIME$belong. And is this distinction even helpful to a programmer? - keywords: currently appears to be the bones which lay the structure of a BASIC program. Includes control-flow and function/subroutine definitions. There are few confusing entries, though, like
ASandRANDOMIZE. And wouldn't it make more sense for data type declarations likeDEFINTto be highlighted as a type? - builtins: appears to be the meat: all the other statements which do something.
PRINT,PEEK,POKE, etc. But there are several counter examples to that idea.DATAandLETseem to be more structural.AND,MOD,NOT,OR, andXORare operators and I would have expected them to be highlighted differently.