diff --git a/README.md b/README.md index eedb8bf..7445348 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ 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 binary and unary-operations (e.g. Add, Sub, Div, Mult, And, Not) diff --git a/documentation/README.md b/documentation/README.md index 55b691b..dd8741b 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -27,7 +27,9 @@ in-depth, but when you're feeling up to it, you can read about them ## Syntax and general information Syntax for Reid is very much inspired by rust, and examples of the language can -be found in the [examples](../examples/)-folder. +be found in the [examples](../examples/)-folder. A larger example of a whole +program written in Reid (a CPU Pathtracer) can be found [in +examples/cpu_raytracer.reid](../examples/cpu_raytracer.reid). In Reid **modules** (or files) on the top-level are comprised of imports, type definitions, binop-definitions, functions and type-associated function blocks. diff --git a/examples/a.reid b/examples/a.reid deleted file mode 100644 index 9b4c939..0000000 --- a/examples/a.reid +++ /dev/null @@ -1,6 +0,0 @@ - -pub fn main() -> u32 { - let b = 4; - let c = b + 4; - return c; -} \ No newline at end of file diff --git a/examples/breaking.reid b/examples/breaking.reid deleted file mode 100644 index 39f5770..0000000 --- a/examples/breaking.reid +++ /dev/null @@ -1,6 +0,0 @@ -import std::String; -import std::print; - -fn main() { - print(String::new() + "hello") -} \ No newline at end of file