Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Feb 17, 2024
1 parent 40cc0b5 commit 42e1154
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ fn({min: 5}) // min*60 + "sec" == "300sec"

#### Node Kinds

* `[∘, a]` - unary prefix or postfix operator
* `[∘, a, b]` - binary operator
* `[∘, a, b, c]` n-ary operator
* `[, a]` - literal value
* `[⚬, a]` - unary prefix or postfix operator `⚬a`
* `[⚬, a, b]` - binary operator `a ⚬ b`
* `[⚬, a, b, c]` n-ary operator `a ⚬ b ⚬ c`
* `[, a]` - literal value `'a'`
* `[⦅⦆, a, b]` - group operator `a⦅b⦆`
* `a` - variable (from scope)


Expand All @@ -115,7 +116,7 @@ _Subscript_ provides pluggable language [features](./features) and API to custom
* `unary(str, precedence, postfix=false)` − register unary operator, either prefix or postfix.
* `binary(str, precedence, rightAssoc=false)` − register binary operator, optionally right-associative.
* `nary(str, precedence, allowSkip=false)` − register n-ary (sequence) operator, optionally allowing skipping args.
* `group(str, precedence, notEmpty=false)` - register a group, like `[]`, `{}`, `()` etc, optionally prohibit empty group.
* `group(str, precedence, prefix=false)` - register a group, like `[]`, `{}`, `()` etc, optionally parse prefix id eg. `a[]`, `a{}`.
* `token(str, precedence, lnode => node)` − register custom token or literal. Callback takes left-side node and returns complete expression node.
* `operator(str, (a, b) => ctx => value)` − register evaluator for an operator. Callback takes node arguments and returns evaluator function.

Expand Down

0 comments on commit 42e1154

Please sign in to comment.