Skip to content

Use isPartOfExpression in extractMethod, not isExpression #18047

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

Merged
2 commits merged into from
Aug 25, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Aug 25, 2017

This reverts the changes to isExpression from #18025. @rbuckton pointed out that we should be using isPartOfExpression outside of transforms, not isExpression, since isExpression shouldn't look at node.parent.

@ghost ghost requested a review from rbuckton August 25, 2017 20:24
Copy link
Contributor

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, pending minor comments.

switch (node.kind) {
return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind);
}
function isLeftHandSideExpressionKind(kind: SyntaxKind): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Whitespace

switch (node.kind) {
return isUnaryExpressionKind(skipPartiallyEmittedExpressions(node).kind);
}
function isUnaryExpressionKind(kind: SyntaxKind): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Whitespace

switch (node.kind) {
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
}
function isExpressionKind(kind: SyntaxKind): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Whitespace

@ghost ghost merged commit e73b10a into master Aug 25, 2017
@ghost ghost deleted the isPartOfExpression branch August 25, 2017 22:15
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants