EmojiScript is a fun programming language that uses emojis as operators and keywords. It features a rich set of operations, an interactive REPL with syntax highlighting, and a file execution mode.
- Interactive REPL with syntax highlighting
- File execution mode
- Rich set of operators and commands
- Colorful terminal output
- Helpful built-in examples and documentation
- Ensure you have Python 3.6+ installed
- Install the required dependencies:
pip install prompt_toolkit pygments termcolor
- Clone this repository:
git clone https://github.com/lwgray/emojiscript
cd emojiscript
Start the interactive REPL by running:
python emoji_cli.py
In the REPL, you can:
- Type code directly
- Use
help
to see available commands - Use
examples
to see example code - Use
exit
to quit - Use Ctrl+D or Ctrl+C to exit
Run an EmojiScript file:
python emoji_cli.py yourscript.ejs
- ๐ข - Print statement
๐ข ๐ญ"Hello, World! ๐"
- ๐ฆ - Variable declaration
๐ฆx = 10
- ๐ค - Addition
- ๐ - Subtraction
- ๐ซ - Multiplication
- โ๏ธ - Division
- ๐ค - If statement
- ๐คท - Else statement
- ๐ - Loop
- ๐ - Greater than
- ๐ - Less than
- ๐ญ - String
- ๐ข - Numbers (direct input)
- ๐ - Create list
- ๐ - Append to list
- ๐ฃ - Get from list
- ๐ฒ - Random number
- ๐ค - Sleep/pause
- ๐ค - Left parenthesis
- ๐ค - Right parenthesis
๐ข ๐ญ"Hello, World! ๐"
๐ฆx = 10
๐ฆy = 5
๐ข ๐ค๐ฆx ๐ค ๐ฆy๐ค
๐ฆnum = 7
๐ค ๐ค๐ฆnum ๐ 5๐ค ๐ข ๐ญ"Big number!" ๐คท ๐ข ๐ญ"Small number!"
๐ฆcounter = 0
๐ 3 ๐ฆcounter = ๐ค๐ฆcounter ๐ค 1๐ค
๐ข ๐ฆcounter
๐ ๐ฆmylist
๐ ๐ฆmylist 42
๐ ๐ฆmylist 42
๐ ๐ฆmylist 17
๐ข ๐ฃ ๐ฆmylist 2
๐ข ๐ฒ 10
EmojiScript provides clear, emoji-enhanced error messages for common issues:
- File not found errors
- Syntax errors
- Runtime errors
emojiscript/
โโโ emoji_cli.py # CLI interface
โโโ emoji.py # Core interpreter
โโโ README.md # Documentation
โโโ test_emoji.py # Unittests
python -m unittest test_emoji.py
Contributions are welcome! Areas for improvement:
- Adding new emoji operators
- Improving error messages
- Adding more examples
- Enhancing the REPL
- Writing documentation
This project is licensed under the MIT License - see the LICENSE file for details.
EmojiScript was created as a fun way to learn about:
- Lexers and parsers
- Interpreter design
- REPL interfaces
- Command-line tools
- 1.0.0
- Interactive REPL with syntax highlighting
- File execution mode
- Complete set of mathematical operators
- Control flow statements
- List operations
- Built-in help and examples