@@ -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
2727import subscript from ' subscript'
2828
2929subscript (' 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
3535import 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
4444import 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
6361import { binary , operator , compile } from ' subscript/justin.js'
6462
63+ // add intersection operator
6564binary (' ∩' , 80 ) // register parser
6665operator (' ∩' , (a , b ) => ( // register compiler
6766 a = compile (a), b = compile (b),
0 commit comments