Skip to content

Commit

Permalink
Updates changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
solomon-b committed Feb 7, 2022
1 parent d038ba6 commit 2ed8228
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Revision history for Kriti-Lang

## Upcoming
- Adds optional lookup operator.
- adds defaulting operator `??`
- Adds optional path lookup operator.
- Fixes unicode support.
- Adds a Pretty Printer.
- Adds `!=`, `>=`, `<=`, `in` operators and `not` function.
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ This example will return a `null` if `foo` is not bound in `$body`. Optional loo
* `?[x]` is used to optionally lookup array indices
* `?['a b c']` is used to optionally lookup string literal object fields

#### Defaulting Operator

The defaulting operator `??` can be used to replace a `null` value with any other value. The expression `null ?? true` will evaluate to `true`. This is especially useful when used with path lookups:

```
$foo?.bar ?? true
```

#### Loops

The `range` identifier is used to declare for loops:
Expand Down

0 comments on commit 2ed8228

Please sign in to comment.