diff options
| author | Akshay Nair <phenax5@gmail.com> | 2022-02-17 21:31:42 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2022-02-17 21:33:15 +0530 |
| commit | 8de4bd6d732c3490a7d7a3d7433d8974b8592895 (patch) | |
| tree | 724502734f4d7b2594a75d1246e3e3428e7f0e33 | |
| parent | dfed1434ebc06a630cd7bde6609e3b122bf81de3 (diff) | |
| download | elxr-8de4bd6d732c3490a7d7a3d7433d8974b8592895.tar.gz elxr-8de4bd6d732c3490a7d7a3d7433d8974b8592895.zip | |
docs: readme update
| -rw-r--r-- | README.md | 19 | ||||
| -rw-r--r-- | TODO.md | 3 |
2 files changed, 8 insertions, 14 deletions
@@ -13,8 +13,8 @@ Whitespaces are ignored (except within literals) * `\s` => Any **string** * `\n` => Any **number** * `\b` => Any **boolean** -* `\o` => Any **object** (has to be a record) [TODO] -* `\a` => Any **array** [TODO] +* `\o` => Any **object** (has to be a record) <sup>[TODO]</sup> +* `\a` => Any **array** <sup>[TODO]</sup> * `\T` => Any **truthy** value * `\F` => Any **falsey** value * `a|b` => match `a` **or** `b` @@ -22,23 +22,16 @@ Whitespaces are ignored (except within literals) * `a+` => **One or more** consecutive instances of pattern `a` in the list * `a{2, 5}` => **Min-Max** quantifiers (example matches `a` more than 2 times but less than 5) * `(\s\T)` => **Group** (example matches any non-empty string) -* `^a$` => `^` indicates **start** of list, and `$` indicates **end** of list [TODO] +* `^a$` => `^` indicates **start** of list, and `$` indicates **end** of list <sup>[TODO]</sup> * `a,b` => match `a` on current item followed by `b` on the next item (**sequence**) * `[name \s\T]` => match **property** of object (example matches items with property `name` as non-empty string) -* `> n` | `>= n` | `< n` | `<= n` => **Comparison** with literal number [TODO] +* `> n` | `>= n` | `< n` | `<= n` => **Comparison** with literal number <sup>[TODO]</sup> * `/pat/` => Test string values against **regex** * `"foobar"` => String literal (example matches the string `foobar`) * `-2.05` => Number literal (example matches the number `-2.05`) * `true` => Boolean literal (example matches the value `true`) - - -### TODO - - [ ] `replaceAll` function - - [ ] `match` function - - [ ] Named capture groups - - [ ] Non-capturing groups - - [ ] Nested list evaluation - - [ ] Number comarison +* `(?<myMatch> \s\T)` => Named capture group (example matches `\s\T` pattern with the name `myMatch`) <sup>[TODO]</sup> +* `(?: \s\T)` => Non-capturing group (example checks for `\s\T` but doesn't return it as a match) <sup>[TODO]</sup> ### Examples @@ -5,9 +5,10 @@ - [X] Eval: Next item/Sequence - [X] Func: matchAll - [X] `{2, 5}` quantifiers + - [X] Func: replaceAll - [ ] Eval: `^$` start-end - - [ ] Func: replace - [ ] Not/Inverse - [ ] Named capture groups - [ ] Non-capture groups + - [ ] `[prop]` should match object with given property |
