Add named constants (enums) to Small Basic #139
Labels
pri/3
Priority 3 - Something that can be done in SBO 1.1 or later
type/compiler
Issues related to the compiler/language services
type/infrastructure
Infrastructure issues/enhancement to the codebase.
This issue stems from a Yammer discussion.
At the moment, properties such as
TextWindow.ForegroundColor
take a string colour name. This is a poor experience for learners as IntelliSense cannot currently suggest correct values. This occurs at various points in Small Basic's API.To fix this, Small Basic should support named constants (i.e.
enum
values) so that the compiler has a defined set of values it can suggest. This would be best implemented building over the existingenum
infrastructure used by C# etc.To improve user experience, it may be worth considering:
ConsoleColor.Cyan
could be written asCyan
alone in a context that accepts a named constant value)The text was updated successfully, but these errors were encountered: