diff options
| author | Bobby <[email protected]> | 2024-02-17 23:58:48 -0500 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-02-17 23:58:48 -0500 |
| commit | cdce5fe1ce369a820027ee11cb57a83740f79451 (patch) | |
| tree | 25bde46b012e9ee36c7da144003078de38fcd6ad | |
| parent | a18137bab2c53655168be9856e28de8c29232994 (diff) | |
| download | mana-cdce5fe1ce369a820027ee11cb57a83740f79451.tar.xz mana-cdce5fe1ce369a820027ee11cb57a83740f79451.zip | |
Updated Information about REPL, Building and Testing
| -rw-r--r-- | README.md | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -119,5 +119,64 @@ 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: + +```bash +go build +``` + +This will create an executable file named `mana` in the root of the project directory. + +## Running the Tests + +To run the tests, you can use the `go test` command. This will run all of the tests in the project. + +```bash +go test ./... +``` + +Or in a specific package: + +```bash +go test ./lexer +``` + +If you want to run a specific test, you can use the `-run` flag to specify a regular expression that matches the test names. + +```bash +go test -run TestLetStatement +``` + +Furthermore, you can use the `-v` flag to get verbose output from the tests. + +```bash +go test -v ./... +``` + ## License This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. |
