1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00
bobbylisp/README.md

73 lines
2.1 KiB
Markdown
Raw Normal View History

2022-03-11 20:52:24 -06:00
# Hazure
2022-03-15 19:36:39 -05:00
Programming language that compiles to Typescript!
2022-02-25 02:59:17 -06:00
2022-03-12 17:47:31 -06:00
```sml
2022-03-15 19:36:39 -05:00
fun main: void = do
2022-03-11 19:39:37 -06:00
@write("Hello, World!\n");
end;
```
2022-03-12 17:46:50 -06:00
or with the pipe operator:
2022-03-12 17:47:31 -06:00
```sml
2022-03-15 19:36:39 -05:00
fun main: void = do
2022-03-12 17:46:50 -06:00
"Hello, World!\n"
2022-03-12 23:49:00 -06:00
|> @write(_);
2022-03-12 17:46:50 -06:00
end;
```
2022-03-12 19:45:58 -06:00
2022-03-06 14:53:44 -06:00
Note: Everything in this project can be changed at anytime! (I'm still finding out what work best for lots of thing) if you have an idea, feel free to create an issues about it, or even create a PR! (I'd be very happy)
2022-02-12 08:28:56 -06:00
2022-03-15 19:36:39 -05:00
# Prerequistie
- `deno`
- Rust (if you're going to build from source)
2022-03-13 04:21:33 -05:00
# Contributing
Found a bug? Found a better way to do something? Make a pull request or tell me in the issues tab! Anything contributions helps :D
Wanna see how it works under the hood? see the [How it works](https://github.com/azur1s/hazure#how-it-works) tab, you should probably understand it a bit more.
Steps to build:
1) Clone this repo `https://github.com/azur1s/hazure.git`
2022-03-15 19:36:39 -05:00
2) Build executable `cargo build`
3) Try running some examples! `path/to/executable compile path/to/file.hz`
2022-03-13 04:21:33 -05:00
2022-03-13 00:05:50 -06:00
# How it works
2022-03-13 00:14:13 -06:00
```
2022-03-13 00:05:50 -06:00
Source (.hz)
2022-03-13 00:12:44 -06:00
│ crates/main
2022-03-13 00:05:50 -06:00
Lexer produce Token
2022-03-13 00:12:44 -06:00
│ crates/lexer
2022-03-13 00:05:50 -06:00
Parser produce AST
2022-03-13 00:12:44 -06:00
│ crates/parser
2022-03-13 00:05:50 -06:00
Diagnostic(Parsing)
2022-03-13 00:12:44 -06:00
│ │ crates/diagnostic
│ ╰ Fail -> Print error -> Exit
Pass
2022-03-13 00:05:50 -06:00
Lowerer(?) produce HIR
2022-03-13 00:12:44 -06:00
│ crates/hir
2022-03-13 01:22:53 -06:00
Type Checker (TODO)
│ │
│ ╰ Fail -> Print error -> Exit
Pass
2022-03-13 00:05:50 -06:00
Diagnostic(Lowering)
2022-03-13 00:12:44 -06:00
│ │ crates/diagnostic
│ ╰ Fail -> Print error -> Exit
Pass
2022-03-15 19:36:39 -05:00
Codegen produce Typescript
│ crates/codegen
Done
(filename.ts)
2022-03-11 18:14:01 -06:00
```
2022-02-25 04:03:55 -06:00
# License
2022-03-15 19:36:39 -05:00
Hazure is licensed under both [MIT license](https://github.com/azur1s/hazure/blob/master/LICENSE-MIT) and [Apache License](https://github.com/azur1s/hazure/blob/master/LICENSE-APACHE)