https://github.com/janotlelapin/lea
A toy compiler targeting the JVM
https://github.com/janotlelapin/lea
jvm jvm-bytecode jvm-languages
Last synced: 4 months ago
JSON representation
A toy compiler targeting the JVM
- Host: GitHub
- URL: https://github.com/janotlelapin/lea
- Owner: JanotLeLapin
- License: gpl-3.0
- Created: 2024-01-31T18:14:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T22:06:04.000Z (about 2 years ago)
- Last Synced: 2025-03-16T07:23:57.862Z (11 months ago)
- Topics: jvm, jvm-bytecode, jvm-languages
- Language: Rust
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lea
The compiler implemented in Rust for my toy language (Lea), targeting the JVM.
```ts
module Main;
fn main(args: String[]) {
print("Hello, World!");
}
```
## Usage
Download and compile the crate:
```sh
git clone https://github.com/JanotLeLapin/lea
cd lea
cargo build --release
```
Compile and run your program:
```sh
./target/release/leac myleafile.lea
java Main # prints: Hello, World!
```
## Tests
If you have Nix installed on your system, you may run the [unit tests](./test) with `nix run .#tests`.