William C. Johnson

Results 13 issues of William C. Johnson

## Problem `[email protected]`: [Lscdiag](https://wcjohnson.github.io/lscdiag/?v=1&s=eMOafVDDkU7DgzAMw7wVK0_CoMKVKV0pwrAOUMK_woAfYBMKwqnDm8KFwqVpSRzChMKow7rDrzjCg8KHPsONL8OnO8KfwqzCsyfDkcKab8KKHsKDwqgmw7HDlsKrMWFdw7dIwqpRwqQSw5Mfw7c_ZcOuw7JOchXDpsKuw5zDksODw6ZTwocoKsOyEcOnw6zCkmMSYcKIXmPDqmzDkMKiEsOtw5U1w5w8w68dQDt4wrBIYMOgCcOkwo7DoRHDssKEwqtVwpXDhgBfw4rDssOIwrTCoMKPwqhPw7_DolnDnsKwXizDuV_CjzbDoMOSVsKww612w4nDt05ww55oUhxSw698w7XCq8OMw6QhEwEtasOCw6ZlaDjCq8KLw5bCpsK7BsOXwprDrsO8woPCoR_CjUXDj8O5wq3DqcKOFMK0NyPDlXJdwq7Ct2LCnsOZa00gw552w6EXwod5w74FwqnDhW3Dsg#) ```js f() -> for let i = 0; i < 10; i++: val = if check: val2 = 3 val2 else: val3 = 4 val3 ```...

## Problem ```js x = if false: 1 // x === null y = (-> if false: 1 )() // y === undefined ``` Wrapping an expression in a function...

## Problem `[email protected]`: ```js x = if a: if b: c ``` ```js const x = a ? b ? c : void 0 : null; ``` If `a` is...

`[email protected]`: ```js export { a b } ``` ```js Unexpected token, expected , (3:2) ``` The same ASI (ACI?) rules should probably apply here as with objects/arrays.

`[email protected]`: https://wcjohnson.github.io/lscdiag/?v=1&s=eMOafcKOQQrCgzAQRcKvIsKzwqogEsKpFsOqwqbCnsKgF1ApMcKJNjbCmsKQTMKgIMK5e8KTHsOAw5nDjHzDuMK8eQfDjMOywovDngoHw60Bwq_CjcKawrTCu24TSDlFwpoSW2vCvsKuw457EsOnw7rCucOVwobCr8KNIsKaQMKLw5bCi1DCnDUOcMOaWybDksKlHMKDFsOowqXCn8OGfMOYacO2w4jCpkvDj8OGPGszPsOsEEFewqYew5Ipw6rDtMKkwqjDhgLCnFDCgsKhw6BPw40jwqTCqsOSO8K9w49yw7nCq8Opw41IJWzDhCrCucK8w5ExKw12wqRsw4o7woQQwrtKOsKMwqwTw4UxwoQfwpw7VHQ The highlighted AST node is being parsed as an `ArrayPattern` when it should be an `ArrayExpression`. Note that this does not happen above in the `CallExpression` but only...

`[email protected]`: ```js a(b?: T1): T2 -> switch ``` ```js unknown: Unexpected token (1:4) > 1 | a(b?: T1): T2 -> | ^ 2 | switch 3 | ``` The parser...

On `[email protected]`: ```js import type Foo from 'foo'; import type Foo2 from 'foo'; import type Foo3 from 'foo'; var a: {add(x:Foo, ...y:Array): Foo3}; a; ``` ```js import add from 'lodash/add';...

## Problem ```js f() -> { destructure } = invalid ``` ``` unknown: Property argument of ReturnStatement expected node to be of a type ["Expression"] but instead got "ObjectPattern" ```...

With #4 just about done and dusted, this is my next subject of interest. Laying out some thoughts: ## Unrolling We talked about possibly pulling the comprehensions out of immediate...

Many AST nodes are being generated without source locations, which breaks various tools in the ecosystem, including anything that uses source maps.