DOCS: Added boolean expressions and TODO items.

This commit is contained in:
Jeremy Wall 2019-01-17 19:28:41 -06:00
parent d40e89fea9
commit 77075d6c79
2 changed files with 22 additions and 2 deletions

14
TODO.md
View File

@ -1,8 +1,18 @@
# Major Planned Features # Major Planned Features
## Boolean operations and type ## Compile Errors as expression
* contains (for lists or strings) ## String handling
Mostly handled by ranges and indexing for strings?
Type comparisons?
```
let foo = "foo";
foo is str; // evaluates to true
foo is int; // evaluates to false
```
## Query Language (Experimental) ## Query Language (Experimental)

View File

@ -144,6 +144,16 @@ let lst = [1, "two", {three = 3}];
{three = 3, two = 2} in lst // evaluates to false {three = 3, two = 2} in lst // evaluates to false
``` ```
### Boolean Operators
UCG has the standard boolean operators: `&&` and `||`. Both of them short circuit and they require the expressions on each
side to be boolean.
```
true && false == false;
false || true == true;
```
#### Operator Precedence #### Operator Precedence
UCG binary operators follow the typical operator precedence for math. `*` and UCG binary operators follow the typical operator precedence for math. `*` and