Skip to content

Commit 95b6adc

Browse files
committed
Update README.md
1 parent dc86bc2 commit 95b6adc

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ fn({ a: 1, b: 3 }) // 7
2222
## Presets
2323

2424
**subscript** — common expressions (~4kb gzip):
25-
`a.b` `a[b]` `a(b)` `+` `-` `*` `/` `%` `<` `>` `<=` `>=` `==` `!=` `!` `&&` `||` `~` `&` `|` `^` `<<` `>>` `++` `--` `=` `+=` `-=` `*=` `/=`
25+
`a.b a[b] a(b) + - * / % < > <= >= == != ! && || ~ & | ^ << >> ++ -- = += -= *= /=`
2626
```js
2727
import subscript from 'subscript'
2828

2929
subscript('a.b + c * 2')({ a: { b: 1 }, c: 3 }) // 7
3030
```
3131

3232
**justin** — + JSON, arrows, templates (~6kb gzip):
33-
`'str'` `0x` `0b` `===` `!==` `**` `??` `>>>` `?.` `? :` `=>` `...` `[]` `{}` `` ` ` `` `//` `/**/` `true` `false` `null`
33+
`` 'str' 0x 0b === !== ** ?? >>> ?. ? : => ... [] {} ` // /**/ true false null ``
3434
```js
3535
import justin from 'subscript/justin.js'
3636

@@ -39,7 +39,7 @@ justin('{ x: a?.b ?? 0, y: [1, ...rest] }')({ a: null, rest: [2, 3] })
3939
```
4040

4141
**jessie** — + statements, functions (~8kb gzip):
42-
`if` `else` `for` `while` `do` `let` `const` `var` `function` `class` `return` `throw` `try` `catch` `switch` `import` `export` `/regex/`
42+
`if else for while do let const var function class return throw try catch switch import export /regex/`
4343
```js
4444
import jessie from 'subscript/jessie.js'
4545

@@ -57,11 +57,10 @@ Jessie can parse and compile its own source.
5757

5858
## Extension
5959

60-
Add a set intersection operator:
61-
6260
```js
6361
import { binary, operator, compile } from 'subscript/justin.js'
6462

63+
// add intersection operator
6564
binary('', 80) // register parser
6665
operator('', (a, b) => ( // register compiler
6766
a = compile(a), b = compile(b),

0 commit comments

Comments
 (0)