mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
DOCS: Added boolean expressions and TODO items.
This commit is contained in:
parent
d40e89fea9
commit
77075d6c79
14
TODO.md
14
TODO.md
@ -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)
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user