I've added some new features to MY-BASIC:
1. A new keyword "
ME" to MY-BASIC to represent a class instance itself inside its scope
2. Multi-line comment support by surrounding comment lines with "
'[" and "
']"
See an example below:
class clz
var name = "Clz"
def tostring()
return name ' Returns the "name"
enddef
def foo()
print me; ' It will use the overridden "tostring"
enddef
endclass
c = new(clz)
c.name = "Clz (Cloned)"
clz.foo()
c.foo()
'[ Multi-line comment
print "Won't print";
print "Won't print neither";
']
print "End";
@John, Could you add "
ME", "
'[", "
']", and triple dots "
..." to the MB code shader? And is it possible to tell the shader the exact type of an identifier to color it, eg. identifiers after "class", "def", and comments between "'[" and "']", it's better if they could be processed distinctively from normal symbols.
@Markus, Removing the console window is friendly for most Windows guys, but it's still necessary when debugging a script, could you give an option to allow user to open a console window? Eg. adding a "console" statement. FYI. this is a sample to create a console window for GUI based applications on Windows
http://stackoverflow.com/a/23457341/609345.