edlang/README.md

39 lines
511 B
Markdown
Raw Normal View History

2023-03-25 14:29:49 +00:00
# edlang
2024-02-09 08:41:57 +00:00
An experimental statically-typed compiled programming language made with LLVM and Rust.
2023-03-25 14:29:49 +00:00
Syntax is subject to change any time right now. It has a rusty style for now.
2024-02-09 08:41:57 +00:00
```rust
2023-06-03 10:43:12 +00:00
struct Hello {
x: i32,
y: i32,
2023-03-25 14:29:49 +00:00
}
2023-06-03 10:43:12 +00:00
fn test(x: Hello) {
return;
2023-03-25 14:29:49 +00:00
}
2023-06-03 10:43:12 +00:00
fn works(x: i64) -> i64 {
let z = 0;
if 2 == x {
z = x * 2;
} else {
z = x * 3;
}
return z;
}
fn main() -> i64 {
let y: i64 = 2;
let z = y;
return works(z);
}
2023-03-25 14:29:49 +00:00
```
2024-02-09 08:41:57 +00:00
## Dependencies
- Rust
- LLVM 17