Custom Map #7302: First map on mplLang. By: Arin112

Started by AutoPost, April 15, 2019, 02:53:37 PM

Previous topic - Next topic

AutoPost

This topic is for discussion of map #7302: First map on mplLang


Author: Arin112
Size: 128x84

Desc:
Not so long ago I released mplLang v0.26. This is a language that was created to facilitate the writing of CRPL code for maps in CW3. Check out the forum post for details.

Arin112

You can find the source code, download link fow windows and mpl examples here.
The source code of the emitter for this map is here (mpl/CRPL).
And for the map generator here (mpl/ CRPL).
The basic idea is that you write the code for mplLang, then compile and then use the CRPL code that the compiler generates.

Currently the language supports
1. Operators =, +, -, /, *, $ (concatenation), ==, !=, <, >, <=, >=, - (unary), ^ (power), +=, -=, *=, /=, %=, $=, || (or), && (and).
2. Ternary operator ? :
3. Multi assigment [x, y] = CurrentCoords();
4. All functions from CRPL.
5. Some additional functions : stack() for read from stack, refRead - "<-!", refWrite - "->!", refExists - "-?!", refDelete - "--?", exists - "-?", delete - "--";
6. Expressions - for(i=0;i<10;i+=10), do(nTimes), do(0 .. 11), while(cond), once, if()else.
7. Function definition. Functions may have additional attributes - inline (main function must be inline, all calls of inline function will be implaces by it body ) and CRPL(body of CRPL function is just CRPL code).

If you have any questions, suggestions, remarks, bugs, etc. you can drop them here or to my private messages in Discord (Arin112#8343) or here http://github.com/Arin112/mplLang/issues
And as always, I'm sorry for my english.