diff options
| -rw-r--r-- | README.md | 44 |
1 files changed, 19 insertions, 25 deletions
@@ -32,9 +32,26 @@ Mana is a toy programming language written in Go. It is a dynamically typed, int ## REPL -Mana will come with a REPL (Read-Eval-Print-Loop) that can be used to evaluate Mana code. +Mana ships with a Read-Eval-Print-Loop (REPL) that can be used to evaluate Mana code. The REPL can be started by running the `mana` execultable. Note that you will need to [build the project](#building-the-project) before you can run the REPL. + +```bash +/path/to/mana +``` -> *Note*: The REPL is still in development and is not yet usable. Currently, it can only parse and print the AST of the input code. +Mana will then start the REPL and you can start typing Mana code. The REPL will evaluate the code and print the result. + +```text +Hello <username>! Welcome to Mana REPL! + +███╗░░░███╗░█████╗░███╗░░██╗░█████╗░ +████╗░████║██╔══██╗████╗░██║██╔══██╗ +██╔████╔██║███████║██╔██╗██║███████║ +██║╚██╔╝██║██╔══██║██║╚████║██╔══██║ +██║░╚═╝░██║██║░░██║██║░╚███║██║░░██║ +╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═╝░░╚══╝╚═╝░░╚═╝ + +>>> let x = 5; +``` ## Syntax @@ -119,29 +136,6 @@ fn add(x, y) { } ``` -## REPL - -Mana ships with a Read-Eval-Print-Loop (REPL) that can be used to evaluate Mana code. The REPL can be started by running the `mana` execultable. Note that you will need to [build the project](#building-the-project) before you can run the REPL. - -```bash -/path/to/mana -``` - -Mana will then start the REPL and you can start typing Mana code. The REPL will evaluate the code and print the result. - -```text -Hello <username>! Welcome to Mana REPL! - -███╗░░░███╗░█████╗░███╗░░██╗░█████╗░ -████╗░████║██╔══██╗████╗░██║██╔══██╗ -██╔████╔██║███████║██╔██╗██║███████║ -██║╚██╔╝██║██╔══██║██║╚████║██╔══██║ -██║░╚═╝░██║██║░░██║██║░╚███║██║░░██║ -╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═╝░░╚══╝╚═╝░░╚═╝ - ->>> let x = 5; -``` - ## Building the Project To build the project, you will need to have Go installed on your machine. You can download Go from the [official website](https://golang.org/). Once you have Go installed, you can build the project by running the following command: |
