During yesterday and today I've been working to make a simpler, less buggy, scripting language, but added some features.
It has no types, and doesnt support arrays (they were a bitch to work), but it does work more stably, and I have decided to add tables, like Lua, but with [] instead of {}. I've also make working loops.
The reason I did this was to see if the features I wanted to add at first were even that useful. I only want functionality in my scripts, and even though flexibility is good, it is pointless unless you are using it to write anything big (ie the game engine). I only want to for things like AI, etc. So, no need for arrays, types variables, etc.
Here is a working, very stable (and fast) example, of using functions, parameters, variables and tables:
//Database
database = [
a = 3;
node = [
b = 4;
]
]
//Addition
function add(var a, var b)
{
return a+b;
}
//Main function
function main()
{
var a = getTable("database.a");
var b = getTable("database.node.b");
print add(a, b);
}
Obviously, that wont be very good in a game, but using the features here, it can be.
I think this will do for JemSCRIPT to be perfectly honest. All I have to do is add a few operands (like ++), get the ability to read table values directly from C++, make it call DBPro commands, then just make it a dll. Tada! Problem is, I don't have a clue how to do the last two.. I'm sure I'll figure it out though
P.S. Forgot to mention that just like the last one, this one compiles to bytecode too.