Update README.md
This commit is contained in:
parent
7c6d634287
commit
ff1da716e9
@ -157,10 +157,6 @@ cmake llvm -B build -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_ENABLE_ASSERTIONS=ON -D
|
||||
ninja -j23
|
||||
```
|
||||
|
||||
*Also Note:* Building LLVM with `Ninja` was not successful for me, but this
|
||||
method was. Ninja may be successful with you, to try it, add `-G Ninja` to the
|
||||
`cmake`-command, and instead of `make` run `ninja install`.
|
||||
|
||||
### Building this crate itself
|
||||
|
||||
Assuming `llvm-project` from the previous step was at
|
||||
@ -170,6 +166,5 @@ Assuming `llvm-project` from the previous step was at
|
||||
LLVM_SYS_201_PREFIX=/path/llvm-project/build cargo build
|
||||
```
|
||||
|
||||
## In conclusion
|
||||
Good luck! It took me a good 10 hours to figure this out for myself, I sure hope
|
||||
these instructions help both myself and someone else in the future!
|
||||
Alternatively assuming you have LLVM 20.1 or newer installed you may use omit
|
||||
the environment variable entirely and use dynamic linking instead
|
@ -8,22 +8,36 @@
|
||||
//! Much of the syntax in Reid is directly inspired by rust, but mostly it is
|
||||
//! driven by simplicity.
|
||||
//!
|
||||
//! Specifications and a bunch of [documentation for the language can be found
|
||||
//! here](./documentation/).
|
||||
//!
|
||||
//! An example of a real whole program (a CPU pathtracer) can be found [in
|
||||
//! examples/cpu_raytracer.reid](./examples/cpu_raytracer.reid), go have a look!
|
||||
//!
|
||||
//! Reid is currently able to (non-exhaustively):
|
||||
//! - Do basic algebra (e.g. Add, Sub, Mult)
|
||||
//! - Do basic algebra binary and unary-operations (e.g. Add, Sub, Div, Mult,
|
||||
//! And, Not)
|
||||
//! - Resolve complex one-liners correctly using PEDMAS (e.g. `5 + 2 * 5 - 5 *
|
||||
//! 5` is calculated correctly)
|
||||
//! - Handle borrows/derefs, pointers.
|
||||
//! - Declare and call functions with varying parameters and return types
|
||||
//! - Perform type-checking and type-inference such that return-types and
|
||||
//! parameter types must always match.
|
||||
//! - Do simple logic-operations (e.g. If/And/Or)
|
||||
//! - Handle, access, define and initialize structs and arrays.
|
||||
//! - Define and execute For/While loops
|
||||
//! - Output detailed debug information
|
||||
//! - Define extern functions that can be linked to outside modules such as
|
||||
//! `libc`.
|
||||
//! - Define custom binary operations for any two types that hasn't been defined
|
||||
//! previously (such as `u16 + u32`).
|
||||
//!
|
||||
//! An example program of Reid, that calculates the 5th fibonacci number (and
|
||||
//! uses Rust for highlighting) is:
|
||||
//!
|
||||
//! An example program of Reid, that calculates the 5th fibonacci number:
|
||||
//! ```reid
|
||||
//! fn main() -> u16 {
|
||||
//! return fibonacci(5);
|
||||
//! }
|
||||
//!
|
||||
//! fn fibonacci(n: u16) -> u16 {
|
||||
//! if n <= 2 {
|
||||
//! return 1;
|
||||
@ -32,16 +46,13 @@
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
//! Currently missing relevant features (TODOs) are:
|
||||
//! - ~~Arrays~~ (DONE)
|
||||
//! - Structs (and custom types as such)
|
||||
//! - ~~Extern functions~~ (DONE)
|
||||
//! - ~~Strings~~ (DONE)
|
||||
//! - Loops
|
||||
//! - Debug Symbols
|
||||
//! TODOs still (see README.md for more)
|
||||
//! - Error handling
|
||||
//! - Lexing & parsing of whitespace and comments as well
|
||||
//! - LSP implementation
|
||||
//! ```
|
||||
|
||||
use std::{collections::HashMap, path::PathBuf, thread, time::Duration};
|
||||
use std::{collections::HashMap, path::PathBuf};
|
||||
|
||||
use ast::{
|
||||
lexer::{self, FullToken, Token},
|
||||
|
Loading…
Reference in New Issue
Block a user