From ef6a993fde21ef75c040f1a1aa6119499f99ae2f Mon Sep 17 00:00:00 2001 From: apio Date: Thu, 25 Aug 2022 20:25:38 +0200 Subject: [PATCH] Update README.md --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 625eb56..0d552a3 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,29 @@ let @main in { } ``` +## Examples that actually work right now +Exit with exit code 0 (success): +``` +let @main in { + 0 +} +``` +Exit with non-zero exit code (failure): +``` +let @main in { + 1 // or any other number +} +``` +Exit with calculated exit code (yes, this language is a glorified calculator right now): +``` +let @main in { + 3 + 5 * 6 // It doesn't even support parentheses, what a failure +} // the exit code is actually computed at compile time by LLVM (optimizations!!) +``` + ## Documentation -More documentation is available at [Documentation](docs/Documentation.md). +More documentation is available at [Documentation](docs/Documentation.md), whenever this file gets created. ## Building