Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakeroggenbuck/jai
Jai is a programming language
https://github.com/jakeroggenbuck/jai
language lexer parser python rust
Last synced: 5 days ago
JSON representation
Jai is a programming language
- Host: GitHub
- URL: https://github.com/jakeroggenbuck/jai
- Owner: JakeRoggenbuck
- License: mit
- Created: 2021-08-20T21:38:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-12T19:44:18.000Z (about 1 year ago)
- Last Synced: 2023-10-14T21:48:25.508Z (about 1 year ago)
- Topics: language, lexer, parser, python, rust
- Language: Python
- Homepage:
- Size: 133 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Jai ![Pytest](https://img.shields.io/github/actions/workflow/status/jakeroggenbuck/jai/pytest.yml?style=for-the-badge)
Our entry to the [langjam](https://github.com/langjam/jam0001)![image](https://user-images.githubusercontent.com/35516367/130336716-99aa86e5-3f79-4081-b8fa-6a133ca90e87.png)
# Requirements:
Rust & Python
1. Pip requirements: run
```sh
pip install -r requirements.txt
```# Build instructions
1. Build the lexer crate with
```sh
maturin build
```2. Install lexer with
```sh
pip install ./target/wheels/jai-0.1.1-*
# Add a `--force-reinstall` if reinstalling
```# Troubleshooting
- If you get something saying `maturin command not found` after you install it via pip. Try using `python3 -m pip` to install it and `python3 -m maturin` to run it.
- If jai does not seem to change after editing the source, make sure to do the build instructions again and use `--force-reinstall`# Test
1. Run build instructions
2. run pytest![image](https://user-images.githubusercontent.com/35516367/130387800-f4a18210-7c27-4290-9f8d-3eca4d53caad.png)
# Syntax
## Variable
```c
variable: type;
variable: type = value;
```## Functions
```c
fn myfunc(num: int) -> int {
return num + 10;
}
```# Types
| Name | details |
|------|------------|
| int | an integer |
| str | a string |