This is the greatest new compile-to-JavaScript language out there: ErmergershScript.
##Why
This started on a late night after final exams.
There will likely be errors.
This is probably not a proper way to make a language.
I have never done this before.
Just enjoy it.
##How
###Installation
I have no idea how to make an installable language. I'll do this someday.
###Documentation
Before we start, you should know...
- We'll use single quotes for strings.
- Indentation is with 4 spaces.
So here's the dealio with... words...
strerct
:"use strict"
cermernt ~comment~
:// ~comment~
lerngcermernt ~comment~ sterpcermernt
:/* ~comment~ */
ver ~var~ erquerls ~value~
:var ~var~ = ~value~
~var~ erquerls ~value~
:~var~ = ~value~
fernctern ~name~ wert ~variables~
:function ~name~ (~variables~)
ernd
:}
ernd&
:})
erxercerte ~function~ hers ~variables~
:~function~(~variables~)
erxercerte ~function~ hers ~variables...~ wert ~arguments~
:~function~(~variables...~, function (~arguments~) {})
erf ~params~
:if (~params~)
erlse erf ~params~
:else if(~params~)
erlse
:else
nert ~params~
:if(! ~params~)
wherl ~params~
:while(~params~)
ferlerp ~params~
:for(~params~)
rerquer ~module~
:var ~module~ = require(~module~)
rerquer ~module~ nerm ~name~
:var ~name~ = require(~module~)
der
:.
These things will be used in statements with erf, wherl, and ferlerp...
verierble
:var
erquerlserquerls
:===
nerterquerls
:!==
sermercerlern
:;
erquerls
:=
plerserquerls
:+=
mernerserquerls
:-=
termserquerls
:*=
derverderquerls
:/=
lerssthern
:<
grerterthern
:>
lerssthernerquerls
:<=
grerterthernerquerls
:>=
ernd
:&&
er
:||
nert
:!
plers
:+
merners
:-
terms
:*
derverd
:/
plersplers
:++
mernersmerners
:--
sterp
:;
(I made this one purely for the for loops, otherwise not needed)
console.lerg
:console.log
dercermernt
:document
wernderw
:window
##Examples
Check out my official demo here: cassidoo.github.io/ErmergershScript/