diff --git a/go.mod b/go.mod index 9e7cafe00..8aa3d0bdc 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/fsnotify/fsnotify v1.7.0 github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2 github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52 - github.com/tdewolff/parse/v2 v2.7.17 + github.com/tdewolff/parse/v2 v2.7.18 github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 ) diff --git a/go.sum b/go.sum index cb8119380..a87d269ee 100644 --- a/go.sum +++ b/go.sum @@ -25,8 +25,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52 h1:bHOA+qzNf3CwchHAIA1k68QgERWiOgZMIh3qoOB3DzA= github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52/go.mod h1:e1dkYfBKpwfFhwXWrQpEU2ClFgxYOT4SrHd6fKD7nIE= -github.com/tdewolff/parse/v2 v2.7.17 h1:uC10p6DaQQORDy72eaIyD+AvAkaIUOouQ0nWp4uD0D0= -github.com/tdewolff/parse/v2 v2.7.17/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA= +github.com/tdewolff/parse/v2 v2.7.18 h1:uSqjEMT2lwCj5oifBHDcWU2kN1pbLrRENgFWDJa57eI= +github.com/tdewolff/parse/v2 v2.7.18/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA= github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo= diff --git a/js/js_test.go b/js/js_test.go index e79a7ed98..b90da1b8c 100644 --- a/js/js_test.go +++ b/js/js_test.go @@ -190,11 +190,11 @@ func TestJS(t *testing.T) { {`x=undefined`, `x=void 0`}, {`x=undefined()`, `x=(void 0)()`}, {`x=undefined.a`, `x=(void 0).a`}, - //{`undefined=5;x=undefined`, `undefined=5;x=undefined`}, + //{`{const undefined=5;x=undefined}`, `{const undefined=5;x=undefined}`}, {`x=Infinity`, `x=1/0`}, {`x=Infinity()`, `x=(1/0)()`}, {`x=2**Infinity`, `x=2**(1/0)`}, - //{`Infinity=5;x=Infinity`, `Infinity=5;x=Infinity`}, + //{`{const Infinity=5;x=Infinity}`, `{const Infinity=5;x=Infinity}`}, {`!""`, `!0`}, {`!"foobar"`, `!1`}, {`class a extends undefined {}`, `class a extends(void 0){}`}, @@ -636,7 +636,7 @@ func TestJS(t *testing.T) { {`a||=b`, `a||=b`}, {`a??=b`, `a??=b`}, {`a==false`, `a==!1`}, - {`a===false`, `a===!1`}, + //{`a===false`, `a===false`}, {`!(a||b)`, `!a&&!b`}, {`!(a&&b)`, `!a||!b`}, {`!(a&&b)&&c`, `!(a&&b)&&c`}, @@ -648,7 +648,7 @@ func TestJS(t *testing.T) { {`!(0<1&&1<2)`, `!(0<1&&1<2)`}, {`!(a&&b||c&&d)`, `!(a&&b||c&&d)`}, {`!((a||b)&&(c||d))`, `!a&&!b||!c&&!d`}, - {`a===false||b===true?false:true`, `a!==!1&&b!==!0`}, + {`a==false||b==true?false:true`, `a!=!1&&b!=!0`}, //{`!(!(a>=0||a<=1)&&!(a>=2||a<=3))`, `!!(a>=0||a<=1||a>=2||a<=3)`}, // TODO {`!!(a===null||a===undefined)`, `a==null`}, {`a!==null&&a!==undefined`, `a!=null`},