subscript 8.1.1 → 8.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/feature/add.js +2 -2
- package/feature/assign.js +1 -1
- package/feature/call.js +1 -1
- package/feature/increment.js +8 -10
- package/feature/mult.js +3 -3
- package/justin.min.js +1 -1
- package/package.json +1 -1
- package/src/compile.js +9 -6
- package/subscript.min.js +1 -1
package/feature/add.js
CHANGED
|
@@ -12,11 +12,11 @@ binary('-', PREC_ADD), operator('-', (a, b) => b && (a = compile(a), b = compile
|
|
|
12
12
|
binary('+=', PREC_ASSIGN, true)
|
|
13
13
|
operator('+=', (a, b) => (
|
|
14
14
|
b = compile(b),
|
|
15
|
-
prop(a, (container, path, ctx) => container
|
|
15
|
+
prop(a, (container, path, ctx) => container[path] += b(ctx))
|
|
16
16
|
))
|
|
17
17
|
|
|
18
18
|
binary('-=', PREC_ASSIGN, true)
|
|
19
19
|
operator('-=', (a, b) => (
|
|
20
20
|
b = compile(b),
|
|
21
|
-
prop(a, (container, path, ctx) => (container
|
|
21
|
+
prop(a, (container, path, ctx) => (container[path] -= b(ctx)))
|
|
22
22
|
))
|
package/feature/assign.js
CHANGED
package/feature/call.js
CHANGED
|
@@ -10,6 +10,6 @@ operator('(', (a, b, args) => (
|
|
|
10
10
|
(b = compile(b), ctx => [b(ctx)]), // a(b)
|
|
11
11
|
|
|
12
12
|
// a(...args), a.b(...args), a[b](...args)
|
|
13
|
-
prop(a, (obj, path, ctx) => obj
|
|
13
|
+
prop(a, (obj, path, ctx) => obj[path](...args(ctx)), true)
|
|
14
14
|
)
|
|
15
15
|
)
|
package/feature/increment.js
CHANGED
|
@@ -3,14 +3,12 @@ import { operator, compile, prop } from "../src/compile.js"
|
|
|
3
3
|
import { PREC_POSTFIX } from "../src/const.js"
|
|
4
4
|
|
|
5
5
|
let inc, dec
|
|
6
|
-
token('++', PREC_POSTFIX, a => a ? ['
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
)
|
|
6
|
+
token('++', PREC_POSTFIX, a => a ? ['++-', a] : ['++', expr(PREC_POSTFIX - 1)])
|
|
7
|
+
// ++a, ++((a)), ++a.b, ++a[b]
|
|
8
|
+
operator('++', inc = (a) => prop(a, (obj, path, ctx) => ++obj[path]))
|
|
9
|
+
operator('++-', inc = (a) => prop(a, (obj, path, ctx) => obj[path]++))
|
|
11
10
|
|
|
12
|
-
token('--', PREC_POSTFIX, a => a ? ['
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
))
|
|
11
|
+
token('--', PREC_POSTFIX, a => a ? ['--+', a] : ['--', expr(PREC_POSTFIX - 1)])
|
|
12
|
+
// --a, --a.b, --a[b]
|
|
13
|
+
operator('--', dec = (a) => (prop(a, (obj, path, ctx) => --obj[path])))
|
|
14
|
+
operator('--+', dec = (a) => (prop(a, (obj, path, ctx) => obj[path]--)))
|
package/feature/mult.js
CHANGED
|
@@ -9,17 +9,17 @@ binary('%', PREC_MULT), operator('%', (a, b) => b && (a = compile(a), b = compil
|
|
|
9
9
|
binary('*=', PREC_ASSIGN, true)
|
|
10
10
|
operator('*=', (a, b) => (
|
|
11
11
|
b = compile(b),
|
|
12
|
-
prop(a, (container, path, ctx) => container
|
|
12
|
+
prop(a, (container, path, ctx) => container[path] *= b(ctx))
|
|
13
13
|
))
|
|
14
14
|
|
|
15
15
|
binary('/=', PREC_ASSIGN, true)
|
|
16
16
|
operator('/=', (a, b) => (
|
|
17
17
|
b = compile(b),
|
|
18
|
-
prop(a, (container, path, ctx) => container
|
|
18
|
+
prop(a, (container, path, ctx) => container[path] /= b(ctx))
|
|
19
19
|
))
|
|
20
20
|
|
|
21
21
|
binary('%=', PREC_ASSIGN, true)
|
|
22
22
|
operator('%=', (a, b) => (
|
|
23
23
|
b = compile(b),
|
|
24
|
-
prop(a, (container, path, ctx) => container
|
|
24
|
+
prop(a, (container, path, ctx) => container[path] %= b(ctx))
|
|
25
25
|
))
|
package/justin.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let r,e,t=t=>(r=0,e=t,t=
|
|
1
|
+
let r,e,t=t=>(r=0,e=t,t=i(),e[r]?a():t||""),a=(t="Bad syntax",a=e.slice(0,r).split("\n"),s=a.pop())=>{let i=e.slice(r-108,r).split("\n").pop(),n=e.slice(r,r+108).split("\n").shift();throw EvalError(`${t} at ${a.length}:${s.length} \`${r>=108?"…":""}${i}▶${n}\``,"font-weight: bold")},s=(t=1,a=r,s)=>{if("number"==typeof t)r+=t;else for(;s=t(e.charCodeAt(r));)r+=s;return e.slice(a,r)},i=(e=0,s,i,n,l,p)=>{for(;(i=t.space())&&(l=((p=o[i])&&p(n,e))??(!n&&t.id()));)n=l;return s&&(i==s?r++:a()),n},n=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||36==r||95==r||r>=192&&215!=r&&247!=r;t.id=()=>s(n);let l=t.space=t=>{for(;(t=e.charCodeAt(r))<=32;)r++;return t},o=[],p=(t,a=32,s,i=t.charCodeAt(0),l=t.length,p=o[i],c=t.toUpperCase()!==t)=>o[i]=(i,o,d=r)=>o<a&&(l<2||e.substr(r,l)==t)&&(!c||!n(e.charCodeAt(r+l)))&&(r+=l,s(i,o))||(r=d,p?.(i,o)),c=(r,e,t=!1)=>p(r,e,((a,s)=>a&&(s=i(e-(t?.5:0)))&&[r,a,s])),d=(r,e,t)=>p(r,e,(a=>t?a&&[r,a]:!a&&(a=i(e-.5))&&[r,a])),f=(r,e)=>{p(r,e,((t,a)=>(a=i(e),(!t||t[0]!==r)&&(t=[r,t]),t.push(a),t)))},h=(r,e)=>p(r[0],e,(e=>!e&&[r,i(0,r.charCodeAt(1))])),m=(r,e)=>p(r[0],e,(e=>e&&[r[0],e,i(0,r.charCodeAt(1))]));const A=r=>Array.isArray(r)?r[0]?u[r[0]](...r.slice(1)):()=>r[1]:A.id(r);A.id=r=>e=>e?.[r];const u={},y=(r,e,t=u[r])=>u[r]=(...r)=>e(...r)||t&&t(...r),C=(r,e,t,s,i)=>"()"===r[0]?C(r[1],e,t):"string"==typeof r?t=>e(t,r,t):"."===r[0]?(s=A(r[1]),i=r[2],r=>e(s(r),i,r)):"["===r[0]?(s=A(r[1]),i=A(r[2]),r=>e(s(r),i(r),r)):t?(r=A(r),t=>e([r(t)],0,t)):()=>a("Bad left value"),b=r=>r?a():[,(r=+s((r=>46===r||r>=48&&r<=57||(69===r||101===r?2:0))))!=r?a():r];o[46]=r=>!r&&b();for(let r=48;r<=57;r++)o[r]=b;const g={n:"\n",r:"\r",t:"\t",b:"\b",f:"\f",v:"\v"},$=t=>(i,n,l="")=>{for(i&&a("Unexpected string"),s();(n=e.charCodeAt(r))-t;)92===n?(s(),n=s(),l+=g[n]||n):l+=s();return s()||a("Bad string"),[,l]};o[34]=$(34),o[39]=$(39),m("()",17),y("(",((r,e,t)=>(t=e?","===e[0]?(e=e.slice(1).map((r=>r?A(r):err())),r=>e.map((e=>e(r)))):(e=A(e),r=>[e(r)]):()=>[],C(r,((r,e,a)=>r[e](...t(a))),!0)))),m("[]",17),y("[",((r,e)=>e?(r=A(r),e=A(e),t=>r(t)[e(t)]):err())),c(".",17),y(".",((r,e)=>(r=A(r),e=e[0]?e:e[1],t=>r(t)[e]))),h("()",17),y("()",(r=>(!r&&a("Empty ()"),A(r))));const v=(...r)=>(r=r.map(A),e=>r.map((r=>r(e))).pop());f(",",1),y(",",v),f(";",1),y(";",v),c("*",12),y("*",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)*e(t)))),c("/",12),y("/",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)/e(t)))),c("%",12),y("%",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)%e(t)))),c("*=",2,!0),y("*=",((r,e)=>(e=A(e),C(r,((r,t,a)=>r[t]*=e(a)))))),c("/=",2,!0),y("/=",((r,e)=>(e=A(e),C(r,((r,t,a)=>r[t]/=e(a)))))),c("%=",2,!0),y("%=",((r,e)=>(e=A(e),C(r,((r,t,a)=>r[t]%=e(a)))))),d("+",14),y("+",((r,e)=>!e&&(r=A(r),e=>+r(e)))),d("-",14),y("-",((r,e)=>!e&&(r=A(r),e=>-r(e)))),c("+",11),y("+",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)+e(t)))),c("-",11),y("-",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)-e(t)))),c("+=",2,!0),y("+=",((r,e)=>(e=A(e),C(r,((r,t,a)=>r[t]+=e(a)))))),c("-=",2,!0),y("-=",((r,e)=>(e=A(e),C(r,((r,t,a)=>r[t]-=e(a)))))),p("++",15,(r=>r?["++-",r]:["++",i(14)])),y("++",(r=>C(r,((r,e,t)=>++r[e])))),y("++-",(r=>C(r,((r,e,t)=>r[e]++)))),p("--",15,(r=>r?["--+",r]:["--",i(14)])),y("--",(r=>C(r,((r,e,t)=>--r[e])))),y("--+",(r=>C(r,((r,e,t)=>r[e]--)))),d("~",14),y("~",((r,e)=>!e&&(r=A(r),e=>~r(e)))),c("|",5),y("|",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)|e(t)))),c("&",7),y("&",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)&e(t)))),c("^",6),y("^",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)^e(t)))),c(">>",10),y(">>",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)>>e(t)))),c("<<",10),y("<<",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)<<e(t)))),c("==",8),y("==",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)==e(t)))),c("!=",8),y("!=",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)!=e(t)))),c(">",8),y(">",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)>e(t)))),c("<",8),y("<",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)<e(t)))),c(">=",8),y(">=",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)>=e(t)))),c("<=",8),y("<=",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)<=e(t)))),d("!",14),y("!",((r,e)=>!e&&(r=A(r),e=>!r(e)))),c("||",3),y("||",((r,e)=>(r=A(r),e=A(e),t=>r(t)||e(t)))),c("&&",4),y("&&",((r,e)=>(r=A(r),e=A(e),t=>r(t)&&e(t)))),c("=",2,!0),y("=",((r,e)=>(e=A(e),C(r,((r,t,a)=>r[t]=e(a))))));var E=r=>A(t(r));p("/*",20,((t,a)=>(s((t=>42!==t&&47!==e.charCodeAt(r+1))),s(2),t||i(a)||[]))),p("//",20,((r,e)=>(s((r=>r>=32)),r||i(e)||[""]))),c("**",13,!0),y("**",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)**e(t)))),c("in",9),y("in",((r,e)=>e&&(r=A(r),e=A(e),t=>r(t)in e(t)))),p("?",2,((r,e,t)=>r&&(e=i(2,58))&&["?",r,e,i(3)])),y("?",((r,e,t)=>(r=A(r),e=A(e),t=A(t),a=>r(a)?e(a):t(a)))),p("true",20,(r=>r?err():[,!0])),p("false",20,(r=>r?err():[,!1])),h("[]",20),y("[]",((r,e)=>r?","===r[0]?(r=r.slice(1).map(A),e=>r.map((r=>r(e)))):(r=A(r),e=>[r(e)]):()=>[])),h("{}",20),y("{}",((r,e)=>r?","===r[0]?(r=r.slice(1).map(A),e=>Object.fromEntries(r.map((r=>r(e))))):":"===r[0]?(r=A(r),e=>Object.fromEntries([r(e)])):(e=A(r),t=>({[r]:e(t)})):()=>({}))),c(":",2,!0),y(":",((r,e)=>(e=A(e),r=Array.isArray(r)?A(r):(r=>r).bind(0,r),t=>[r(t),e(t)]))),p("?.",17,(r=>r&&["?.",r])),y("?.",(r=>(r=A(r),e=>r(e)||(()=>{})))),p("?.",17,((r,e)=>r&&!(e=i(17))?.map&&["?.",r,e])),y("?.",((r,e)=>e&&(r=A(r),t=>r(t)?.[e]))),y("(",((r,e,t,a,s,i)=>"?."===r[0]&&(r[2]||Array.isArray(r[1]))&&(a=e?","===e[0]?(e=e.slice(1).map(A),r=>e.map((e=>e(r)))):(e=A(e),r=>[e(r)]):()=>[],!r[2]&&(r=r[1]),s="["===r[0]?A(r[2]):()=>r[2],t=A(r[1]),r=>t(r)?.[s(r)]?.(...a(r))))),p("null",20,(r=>r?a():[,null]));export{m as access,c as binary,A as compile,e as cur,E as default,a as err,i as expr,h as group,r as idx,n as isId,o as lookup,f as nary,y as operator,u as operators,t as parse,C as prop,s as skip,l as space,p as token,d as unary};
|
package/package.json
CHANGED
package/src/compile.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { err } from "./parse.js"
|
|
2
2
|
|
|
3
3
|
// build optimized evaluator for the tree
|
|
4
|
-
export const compile = (node) => !Array.isArray(node) ?
|
|
4
|
+
export const compile = (node) => !Array.isArray(node) ? compile.id(node) : !node[0] ? () => node[1] : operators[node[0]](...node.slice(1)),
|
|
5
|
+
// compile id getter
|
|
6
|
+
id = compile.id = name => ctx => ctx?.[name],
|
|
7
|
+
|
|
5
8
|
|
|
6
9
|
// registered operators
|
|
7
10
|
operators = {},
|
|
@@ -10,17 +13,17 @@ export const compile = (node) => !Array.isArray(node) ? ctx => ctx?.[node] : !no
|
|
|
10
13
|
operator = (op, fn, prev = operators[op]) => (operators[op] = (...args) => fn(...args) || prev && prev(...args)),
|
|
11
14
|
|
|
12
15
|
// takes node and returns evaluator depending on the case with passed params (container, path, ctx) =>
|
|
13
|
-
prop = (a, fn, generic) => (
|
|
16
|
+
prop = (a, fn, generic, obj, path) => (
|
|
14
17
|
// (((x))) => x
|
|
15
18
|
a[0] === '()' ? prop(a[1], fn, generic) :
|
|
16
19
|
// (_, name, ctx) => ctx[path]
|
|
17
|
-
typeof a === 'string' ?
|
|
20
|
+
typeof a === 'string' ? ctx => fn(ctx, a, ctx) :
|
|
18
21
|
// (container, path, ctx) => container(ctx)[path]
|
|
19
|
-
a[0] === '.' ?
|
|
22
|
+
a[0] === '.' ? (obj = compile(a[1]), path = a[2], ctx => fn(obj(ctx), path, ctx)) :
|
|
20
23
|
// (container, path, ctx) => container(ctx)[path(ctx)]
|
|
21
|
-
a[0] === '[' ?
|
|
24
|
+
a[0] === '[' ? (obj = compile(a[1]), path = compile(a[2]), ctx => fn(obj(ctx), path(ctx), ctx)) :
|
|
22
25
|
// (src, _, ctx) => src(ctx)
|
|
23
|
-
generic ? (a = compile(a),
|
|
26
|
+
generic ? (a = compile(a), ctx => fn([a(ctx)], 0, ctx)) : () => err('Bad left value')
|
|
24
27
|
)
|
|
25
28
|
|
|
26
29
|
export default compile
|
package/subscript.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let
|
|
1
|
+
let t,e,r=r=>(t=0,e=r,r=a(),e[t]?s():r||""),s=(r="Bad syntax",s=e.slice(0,t).split("\n"),o=s.pop())=>{let a=e.slice(t-108,t).split("\n").pop(),n=e.slice(t,t+108).split("\n").shift();throw EvalError(`${r} at ${s.length}:${o.length} \`${t>=108?"…":""}${a}▶${n}\``,"font-weight: bold")},o=(r=1,s=t,o)=>{if("number"==typeof r)t+=r;else for(;o=r(e.charCodeAt(t));)t+=o;return e.slice(s,t)},a=(e=0,o,a,n,p,c)=>{for(;(a=r.space())&&(p=((c=l[a])&&c(n,e))??(!n&&r.id()));)n=p;return o&&(a==o?t++:s()),n},n=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||36==t||95==t||t>=192&&215!=t&&247!=t;r.id=()=>o(n);let p=r.space=r=>{for(;(r=e.charCodeAt(t))<=32;)t++;return r},l=[],c=(r,s=32,o,a=r.charCodeAt(0),p=r.length,c=l[a],i=r.toUpperCase()!==r)=>l[a]=(a,l,d=t)=>l<s&&(p<2||e.substr(t,p)==r)&&(!i||!n(e.charCodeAt(t+p)))&&(t+=p,o(a,l))||(t=d,c?.(a,l)),i=(t,e,r=!1)=>c(t,e,((s,o)=>s&&(o=a(e-(r?.5:0)))&&[t,s,o])),d=(t,e,r)=>c(t,e,(s=>r?s&&[t,s]:!s&&(s=a(e-.5))&&[t,s])),f=(t,e)=>{c(t,e,((r,s)=>(s=a(e),(!r||r[0]!==t)&&(r=[t,r]),r.push(s),r)))},h=(t,e)=>c(t[0],e,(e=>!e&&[t,a(0,t.charCodeAt(1))])),u=(t,e)=>c(t[0],e,(e=>e&&[t[0],e,a(0,t.charCodeAt(1))]));const A=t=>t?s():[,(t=+o((t=>46===t||t>=48&&t<=57||(69===t||101===t?2:0))))!=t?s():t];l[46]=t=>!t&&A();for(let t=48;t<=57;t++)l[t]=A;const C={n:"\n",r:"\r",t:"\t",b:"\b",f:"\f",v:"\v"},g=r=>(a,n,p="")=>{for(a&&s("Unexpected string"),o();(n=e.charCodeAt(t))-r;)92===n?(o(),n=o(),p+=C[n]||n):p+=o();return o()||s("Bad string"),[,p]};l[34]=g(34),l[39]=g(39);const m=t=>Array.isArray(t)?t[0]?y[t[0]](...t.slice(1)):()=>t[1]:m.id(t);m.id=t=>e=>e?.[t];const y={},$=(t,e,r=y[t])=>y[t]=(...t)=>e(...t)||r&&r(...t),b=(t,e,r,o,a)=>"()"===t[0]?b(t[1],e,r):"string"==typeof t?r=>e(r,t,r):"."===t[0]?(o=m(t[1]),a=t[2],t=>e(o(t),a,t)):"["===t[0]?(o=m(t[1]),a=m(t[2]),t=>e(o(t),a(t),t)):r?(t=m(t),r=>e([t(r)],0,r)):()=>s("Bad left value");u("()",17),$("(",((t,e,r)=>(r=e?","===e[0]?(e=e.slice(1).map((t=>t?m(t):err())),t=>e.map((e=>e(t)))):(e=m(e),t=>[e(t)]):()=>[],b(t,((t,e,s)=>t[e](...r(s))),!0)))),u("[]",17),$("[",((t,e)=>e?(t=m(t),e=m(e),r=>t(r)[e(r)]):err())),i(".",17),$(".",((t,e)=>(t=m(t),e=e[0]?e:e[1],r=>t(r)[e]))),h("()",17),$("()",(t=>(!t&&s("Empty ()"),m(t))));const v=(...t)=>(t=t.map(m),e=>t.map((t=>t(e))).pop());f(",",1),$(",",v),f(";",1),$(";",v),i("*",12),$("*",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)*e(r)))),i("/",12),$("/",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)/e(r)))),i("%",12),$("%",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)%e(r)))),i("*=",2,!0),$("*=",((t,e)=>(e=m(e),b(t,((t,r,s)=>t[r]*=e(s)))))),i("/=",2,!0),$("/=",((t,e)=>(e=m(e),b(t,((t,r,s)=>t[r]/=e(s)))))),i("%=",2,!0),$("%=",((t,e)=>(e=m(e),b(t,((t,r,s)=>t[r]%=e(s)))))),d("+",14),$("+",((t,e)=>!e&&(t=m(t),e=>+t(e)))),d("-",14),$("-",((t,e)=>!e&&(t=m(t),e=>-t(e)))),i("+",11),$("+",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)+e(r)))),i("-",11),$("-",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)-e(r)))),i("+=",2,!0),$("+=",((t,e)=>(e=m(e),b(t,((t,r,s)=>t[r]+=e(s)))))),i("-=",2,!0),$("-=",((t,e)=>(e=m(e),b(t,((t,r,s)=>t[r]-=e(s)))))),c("++",15,(t=>t?["++-",t]:["++",a(14)])),$("++",(t=>b(t,((t,e,r)=>++t[e])))),$("++-",(t=>b(t,((t,e,r)=>t[e]++)))),c("--",15,(t=>t?["--+",t]:["--",a(14)])),$("--",(t=>b(t,((t,e,r)=>--t[e])))),$("--+",(t=>b(t,((t,e,r)=>t[e]--)))),d("~",14),$("~",((t,e)=>!e&&(t=m(t),e=>~t(e)))),i("|",5),$("|",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)|e(r)))),i("&",7),$("&",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)&e(r)))),i("^",6),$("^",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)^e(r)))),i(">>",10),$(">>",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)>>e(r)))),i("<<",10),$("<<",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)<<e(r)))),i("==",8),$("==",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)==e(r)))),i("!=",8),$("!=",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)!=e(r)))),i(">",8),$(">",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)>e(r)))),i("<",8),$("<",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)<e(r)))),i(">=",8),$(">=",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)>=e(r)))),i("<=",8),$("<=",((t,e)=>e&&(t=m(t),e=m(e),r=>t(r)<=e(r)))),d("!",14),$("!",((t,e)=>!e&&(t=m(t),e=>!t(e)))),i("||",3),$("||",((t,e)=>(t=m(t),e=m(e),r=>t(r)||e(r)))),i("&&",4),$("&&",((t,e)=>(t=m(t),e=m(e),r=>t(r)&&e(r)))),i("=",2,!0),$("=",((t,e)=>(e=m(e),b(t,((t,r,s)=>t[r]=e(s))))));var x=t=>m(r(t));export{u as access,i as binary,m as compile,e as cur,x as default,s as err,a as expr,h as group,t as idx,n as isId,l as lookup,f as nary,$ as operator,y as operators,r as parse,b as prop,o as skip,p as space,c as token,d as unary};
|