I'm writing an interpreted language that I can incorporate into irrlicht (and other programs) and easily extend. I've made it such that I can control the input of tokens without modifying the main frame of the interpreter. The standard way of reading things would be simply getting token separated by spaces. I've also made the interpreter such that I can easily add new tokens (once again, without modifying the main frame of the interpreter) and give them the syntax I want. From the parser, I can grab any token I want and interpret it as an object in a couple quick steps. A couple important limitations, though: parenthesis and curly brackets create bodies of code.
My design decision comes in here:
I'm writing an extension class that interprets functions, and I'm trying to decide what would be the most convenient, logical syntax for running a function. The syntax for function creation is as follows:
Code: Select all
func myFunction params
{
}
A few options to think about (other suggestions are more than welcome):
Code: Select all
run myFunction params
Another option:
Code: Select all
myFunction processes params
Or maybe
Code: Select all
myFunction(params)
Now, you may think, "Why not just use square brackets"? - The thing is, square brackets denote nameless list creation (although I may change this at you guys' suggestion to simply "list ... ;").
So that's the scenario. I'd appreciate you guys' advice, tips, and suggestions. Any questions?