Updated readme
This commit is contained in:
129
README.md
129
README.md
@@ -1,18 +1,125 @@
|
||||
# Violet
|
||||
<div align="center">
|
||||
|
||||
## Stack Guide
|
||||
<h1 style="color:#967bb6;font-size:3rem;">Violet</h1>
|
||||
|
||||
### Install Dependencies
|
||||
An expressive, type-safe programming language
|
||||
|
||||
1. `stack.yaml`: add `package-name-version` to `extra-deps`
|
||||
2. `package.yaml`: add `package-name` to `dependencies`
|
||||
3. run `stack build`
|
||||
[![Release v0.1.0][release-badge]](https://github.com/zyrrus/violet/releases)
|
||||
[![Haskell][haskell-badge]](https://www.haskell.org/)
|
||||
|
||||
### Run GHCI
|
||||
[release-badge]: https://img.shields.io/badge/v0.1.0-996677?colorA=151515&style=for-the-badge
|
||||
[haskell-badge]: https://img.shields.io/badge/Haskell-5e5086?logo=haskell&logoColor=white&style=for-the-badge
|
||||
|
||||
1. run `stack ghci`
|
||||
2. run `:set -XOverloadedStrings` in GHCI
|
||||
</div>
|
||||
|
||||
## References
|
||||
<!-- TABLE OF CONTENTS -->
|
||||
<details>
|
||||
<summary>Table of Contents</summary>
|
||||
<ol>
|
||||
<li>
|
||||
<a href="#about-the-project">About the Project</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#getting-started">Getting Started</a>
|
||||
<ul>
|
||||
<li><a href="#prerequisites">Prerequisites</a></li>
|
||||
<li><a href="#installation">Installation</a></li>
|
||||
<li><a href="#development-guides">Development Guides</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#usage">Usage</a></li>
|
||||
<li><a href="#roadmap">Roadmap</a></li>
|
||||
</ol>
|
||||
</details>
|
||||
|
||||
[Megaparsec guide](https://markkarpov.com/tutorial/megaparsec.html#parsect-and-parsec-monads)
|
||||
## About the Project
|
||||
|
||||
The Violet programming language draws inspiration from Python's expressiveness, Rust's syntax clarity, and TypeScript's type system. The goal is to create a versatile tool for developers that is easy to learn and doesn't sacrifice performance or type-safety.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Follow these steps to set up a development environment.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
You'll need to have Haskell and Stack set up on your system. I advise installing [GHCup](https://haskell.org/ghcup/install) to manage your Haskell environment.
|
||||
|
||||
These are the versions I had installed while developing Violet.
|
||||
|
||||
| | Version |
|
||||
| ----- | -------: |
|
||||
| GHCup | 0.1.20.0 |
|
||||
| GHC | 9.4.8 |
|
||||
| Stack | 2.13.1 |
|
||||
| Cabal | 3.10.2.1 |
|
||||
| HLS | 2.5.0.0 |
|
||||
|
||||
### Installation
|
||||
|
||||
1. Clone the repo
|
||||
```sh
|
||||
git clone https://github.com/zyrrus/violet.git
|
||||
```
|
||||
2. Build the project
|
||||
```sh
|
||||
stack build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Development Guides
|
||||
|
||||
This section contains small, miscellaneous guides for anything I find helpful that is not specifically tied to setting up the environment for this project.
|
||||
|
||||
#### Installing Dependencies
|
||||
|
||||
1. In `stack.yaml`, add `package-name-version` to `extra-deps`
|
||||
2. In `package.yaml`, add `package-name` to `dependencies`
|
||||
3. Build the project again
|
||||
```sh
|
||||
stack build
|
||||
```
|
||||
|
||||
#### Running GHCI
|
||||
|
||||
1. Run the interpreter
|
||||
```sh
|
||||
stack ghci
|
||||
```
|
||||
2. Run `:set -XOverloadedStrings` in GHCI
|
||||
|
||||
## Usage
|
||||
|
||||
> **⚠️ Warning:**\
|
||||
> Violet is a hobby project that is still under development.
|
||||
|
||||
### Release v0.1.0 (Parser executable)
|
||||
|
||||
This release contains an executable, `violet.exe`, that just parses a file and prints the program in the form of a list of `Statements`
|
||||
|
||||
The program expects a single file path argument (demonstrated below).
|
||||
|
||||
```sh
|
||||
./violet.exe path/to/file.vi
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
||||
- [x] Basic lexer/parser
|
||||
- [x] Comments (block + single-line)
|
||||
- [x] Imports
|
||||
- [x] Function definitions
|
||||
- [x] Variable declaration + assignment
|
||||
- [x] Conditionals
|
||||
- [x] Expressions
|
||||
- [ ] Full lexer/parser
|
||||
- [ ] Type system (definitions + operations)
|
||||
- [ ] Lists
|
||||
- [ ] List comprehensions
|
||||
- [ ] Ternary operations
|
||||
- [ ] Bit-wise operations
|
||||
- [ ] Syntactic sugar (`elif`, compound assignment operators like `x += 4`)
|
||||
- [ ] Semantic analysis
|
||||
- [ ] Compiler
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user