- Strict typed language.
- Reads down the file looking for functions that separates them into smaller "programs"
- Reads down again looking for global variables.
- Variables are defined like so.
a:int = 2
or they can be dynamically assignedb := "hello"
- The program should start from a entry point like Java's main function. probably going to go for an "onStart" function
- Basic output will be enough for now. e.g.
out("Hello");
orout(3 + 4);
- There will be two kinds of functions, inline and block.
- Inline functions will look like so.
function d:int () -> return 3 + 4;
- Block functions will work like so.
function d:string () { return "Hello World!"; }
- Basic arithmetic should be in the initial version, with more complex things to arrive later on.
- The following are the minimum we want to launch with.
+
,-
,/
,*
,!
. - Later on I think that adding various others would help greatly for example.
PI
,sin
,cos
,tan
,abs
.
num x = 3;
num y = 4;
string name = "Dave";
x += 7;
y -= 1;
num z = x + y;
out z;
out name;
When this example is run, we should get the output as '13 "Dave"'.
Completed:
- Basic parsing of file.
- Variables can be manipulated.
- Functions can be created and called.
- Can add special variables such as "pi" with ease.
Todo (in order of importance):
- Local variables in functions.
- Arrays.
- Non integer number support.
- File reading.
- Self-interpriting (possibility).
I'm open to suggestions if you have any, just open up a new issue and tag it as suggestion. I'll do my best to read it ASAP.