emojilang is a toy language comprised only of emojis.
# control structures
π€ - if
π₯ - while
# boolean operators
π - <
π - >
π - <=
π - >=
π - ==
π - !=
# numerical operators
π₯ - *
β¨ - +
π« - -
π―οΈ - /
π - %
# delimiters
π - (
π - )
π« - {
π¬ - }
# literals
π - true
π’ - false
0οΈβ£ - 0
1οΈβ£ - 1
2οΈβ£ - 2
3οΈβ£ - 3
4οΈβ£ - 4
5οΈβ£ - 5
6οΈβ£ - 6
7οΈβ£ - 7
8οΈβ£ - 8
9οΈβ£ - 9
# variables and assignment
π - assignment
π¦,πΉ,π΅,πΊ,π₯¨, etc. - variable names
# utilities
π’ - print
π€« - comment
π€ - sleep
Print a numeric literal
π’π1οΈβ£π
> 1
Sleep for seconds
π€π1οΈβ£π
Variable assignment
π¦π3οΈβ£
π’ππ¦π
> 3
Commenting
π€« the next line assigns 3οΈβ£ to π¦, this line won't execute
π¦π3οΈβ£
If, and nested if, statements
π€π1οΈβ£π1οΈβ£π π«
π€« this should be executed
π’π2οΈβ£π
π€π1οΈβ£π9οΈβ£π π«
π€« this should not be executed
π’π3οΈβ£π
π¬
π¬
> 2
Numeric operators
π’π8οΈβ£π₯2οΈβ£π
π’π8οΈβ£β¨2οΈβ£π
π’π8οΈβ£π«2οΈβ£π
π’π8οΈβ£π―οΈ2οΈβ£π
π’π8οΈβ£π2οΈβ£π
> 16
> 10
> 6
> 4.0
> 0
π’π4οΈβ£π₯π3οΈβ£β¨5οΈβ£ππ
> 32
Boolean literals
π€πππ π«
π€« this should be executed because π is true
π’π1οΈβ£π
π¬
> 1
π€ππ’π π«
π€« this should not be executed because π’ is not true
π’π1οΈβ£π
π¬
Boolean comparisons
π€π1οΈβ£π1οΈβ£π π«
π€« this should be executed because 1 is equal to 1
π’π1οΈβ£π
π¬
> 1
π€π1οΈβ£π1οΈβ£π π«
π€« this should not be executed because 1 is equal to 1
π’π1οΈβ£π
π¬
π€π1οΈβ£π0οΈβ£π π«
π€« this should be executed because 1 is greater than 0
π’π1οΈβ£π
π¬
> 1
While loop
π₯πππ π«
π€« this should always be executed
π’π1οΈβ£π
π€π3οΈβ£π
π¬
> 1
> 1
...
- mathematical operators
- while loop
- sleep
- if statement
- comments
- boolean operators
- boolean literals
- variables and assignment
pip3 install ply
alias emoji='python3 main.py'
emoji