(My parser has plenty of edge cases it does not yet catch so don't feel obliged to get it fixed or anything. Just found it interesting to match the convo.)
-
-
Replying to @kuvos
TBH. Locale I'm playing around with parsing when I get time. This days I'm testing ut decorators, class fields and private methods. A real PITY. Specially decorators. I looked at your source and noticed the complexity with obj expr / pattern parsing. You may separate that logic.
1 reply 0 retweets 1 like -
Replying to @Ghost1240145716
You're right. I kind of got caught by the unexpected complexity of destructuring. Never really recovered from that :( My first order of business is trying to untangle the difference between what is assignable and destructible. That should clear up return values and some more DRY.
2 replies 0 retweets 0 likes -
Replying to @kuvos
It seems that your bitmasks are to complex. Use a var that only exist inside func for assign and destruct, and not return them. Then use a local destruct var in methods and set the global destruct value at the end. No need to propagate anything. Half of the bitmasks reduced
1 reply 0 retweets 0 likes -
Replying to @Ghost1240145716
Yeah that's fair. I'm not going to use globals for that if I don't have to but I am looking to simplify that. Struggling a little with the model in my head. Stuff can be destructible, assignable destructible (only), not destructible, assignable, and not assignable.
3 replies 0 retweets 0 likes -
Replying to @kuvos @Ghost1240145716
And there's no immediate 1:1 between assignability and destructiblity. Basically a combination of `{a=b}`, `...a=b`, and `[(a)]` all have different flags. And then there's my foolish quest not to have to backtrack, making yield/await cases difficult. And everything, actually :p
3 replies 0 retweets 0 likes -
Replying to @kuvos
In your for statement parsing, shouldn't you disallow initializers to properly throw on illegal cases like `for ([] = 0 of {});` ? I'm not sure if it's have any side-effects in your code. And maybe this V8 pull is interesting too? https://github.com/v8/v8/commit/0c879d1cd05446fbbc0993a791c62bd6937beb86#diff-ce94396215214c89b0e7af2f4c8a1e37 …
2 replies 0 retweets 0 likes -
Replying to @Ghost1240145716
Checked the spec, which rule says `let` is illegal in a for-of lhs? Unfortunately the linked commit has no details on this either. I think it's valid in sloppy mode? And "obviously" a keyword in strict mode so illegal there (I tried a few cases and my parser does that correctly?)
1 reply 0 retweets 0 likes -
Replying to @kuvos
This confuses me too :) But it seems to be related to `let` followed by a member expr, but I can't find it in the specs. It seems like `for (let.x in {}) {}` is valid, but `for (let.x of {}) {}` is not.
1 reply 0 retweets 0 likes -
Replying to @Ghost1240145716
cc
@marjakh@mathias Can you shed light on this super important hi prio UBN "but do enjoy the weekend" case? :)1 reply 0 retweets 0 likes
The linked bug in the commit message has the details: https://bugs.chromium.org/p/v8/issues/detail?id=9160 … cc @bakkoting @tverwaes
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.