-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing support (including incremental parsing) for 'yield' expressions. #1129
Conversation
Conflicts: src/services/syntax/SyntaxGenerator.js.map
Conflicts: src/services/syntax/SyntaxGenerator.js.map
Conflicts: src/services/syntax/SyntaxGenerator.js.map
This CR provides the parsing code for generators/yield-expressions for Fidelity. It also serves as the template/oracle for how we would parse these things in the new parser. The code handles the normal parsing case, as well as incremental parsing (which is tricky as something like tests for all of these are at: I also recommend looking at this CR one commit at a time. Also: this CR doesn't deal with the [GeneratorParameter] portion of ES6, or how [Yield] is treated in formal parameters. I need to walk through the grammar entirely to get a good handle on what they're trying to allow/restrict. |
// we must have gotten a property name. And if that's all we have, we have to check | ||
// if we have a call signature. If so, then this is a member function, otherwise | ||
// it's a member variable. | ||
if (asterixToken || isCallSignature(/*peekIndex:*/ 0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asteriskToken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dear. I clearly read too much Asterix and Obelix as a kid.
Adding more tests here: |
👍 |
Parsing support (including incremental parsing) for 'yield' expressions.
No description provided.