Leo Horie

Results 25 comments of Leo Horie

My two cents: when I added support for this to my toy compiler last week, I actually didn't need to change the parser all that much, because, as you can...

For posterity, I had suggested this in the chat: `(. a b) -> a[b]`, `(. a "b") -> a["b"]` and `(. a 'b) -> a.b`, under the rationale that `quote`...

@impinball brought up another issue in the chat: > things like {a, [b + c]: d}. Using (object a (+ b c) d) would be ambiguous. In total, there are...

Oh, looks like I missed a bunch other cases: - `{* a() {}}` (generator method shorthand) - `{* "a"() {}}` (generator method shorthand w/ string key) - `{[a]() {}}` (computed...

> There are a lot of functions similar to this in Lisp Yeah, `let` form comes to mind. Speaking of which, I realized that `var` has the same issue (i.e....

> Ambiguity: Does (var a b) compile to var a = b; or var a, b;? Yes, that was the ambiguity that I was trying to raise. Personally, I don't...

Looks very similar to what I currently have in that toy compiler I've been working on, except that I use a special form for computed keys instead of non-computed keys....

@impinball both class id and superClass are optional in class expressions, so `(= x (class a))` would be ambiguous if both id and superClass were simply identifiers. (i.e., is it...

It looks like as of version 6.0, Babel is no longer ESTree compliant. I [opened an issue](https://github.com/babel/babel/issues/2769) over there but the author said he's not willing to support the standard...

That's a possible solution. Another solution is to write a compatibility layer that takes a estree ast as input and outputs a babel ast.