Just another compiler with weird syntax (extension .mc). It is still in front end stage.
Things to do:
1. Intermediate Code Generation
2. Backend code generation
Variable declaration must be done inside '<' and '>'. If you want to assign a value, you can put the value inside brackets.
<int i(100)>
Function declaration must be done within double < and > operators.
Function call can be done with '$.' followed by function name.
<<int add(<int a>, <int b>)>> {
<int c(a+b)>
return c
}
'initiate' is the start function which will not accept any arguments.
<<int initiate()>> {
...
}
All these statements needs to be called with '@.' prefix.
If:
<int c>
@.IF(10 < 100) {
c = $.add(100, 200)
} @.ELSE_IF() {
c = $.add(200, 100)
} @.ELSE {
c = -1
}
For:
@.FOR(<int c(100)>; c < 200; c=c+1) {
...
}
Do while:
@.DO_WHILE(c < 1000) {
...
}
While:
@.WHILE(c < 2000) {
...
}