dillon1000/react

Commit

Support for (Optional)MemberExpression callee in OptionalCall

Earlier PRs bailed out when the callee of an OptionalCallExpression was a 
MemberExpression or OptionalMemberExpression (ie for optional method calls). 
This PRs expands support for optional method calls, including when the receiver, 
method, or both are optional. Even better, we don't need to add any additional 
terminals or instruction variants for this case - the one new OptionalCall 
terminal from earlier in the stack works for all these cases.
Browse files
Changed paths7 files
First-parent comparison
M compiler/forget/src/HIR/BuildHIR.ts ModifiedA compiler/forget/src/__tests__/fixtures/compiler/optional-method-call.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-method-call.js AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-receiver-method-call.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-receiver-method-call.js AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-receiver-optional-method.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-receiver-optional-method.js Added
Patch

Files changed

Rendering syntax-highlighted changes…