From 4a4e275e55ecaa125801cd971ce02ff941321bee Mon Sep 17 00:00:00 2001 From: Teascade Date: Sat, 26 Aug 2017 23:55:04 +0000 Subject: [PATCH] Add parenthesis --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index bd9f4bc..58a5d34 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Table of contents for the Omega spec - [General syntax](#general-syntax) - [Expressions](#expressions) - [Scopes](#scopes) +- [Parenthesis](#parenthesis) - [Values](#values) - [Keywords](#keywords) @@ -150,6 +151,16 @@ variable = this_is_scoped; // Exception! Cannot access inner-scope. As is visible in the example, variables defined in the scope are no longer accessible outside the scope. Scopes exist in their individual "environments", where they can access the variables in their upper scopes, but not inner scopes. +## Parenthesis +Parenthesis`()` can be added to surround any [operators](#operators), [expressions](#expressions), [values](#values) or [keywords](#keywords) to guide on what order and how the code should be run. + +For example: +- `(2 + 3) * 5` = `5 * 5` = `25` +- `!(true ^ true)` +- `(print("test"))` Here parenthesis won't do much through +- `2 + (3)` Here parenthesis are somewhat useless aswell. +- `(unwrap optional) * 5` + ## Values There are a number of values you can assign to your variables, as of Omega 1.0, only primitive values are possible. Such types are: - `string`, a basic piece of text, defined as followes: `"String here"`.