Skip to content

Show token hints for missing closing braces #36317

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
merged 3 commits into from
Mar 12, 2020

Conversation

sheonhan
Copy link
Contributor

Fixes #35597

@sheonhan
Copy link
Contributor Author

sheonhan commented Jan 20, 2020

#35597 (comment)

  • } braces in

    • object literals
    • interfaces and object type literals
    • namespaces and augmentations
    • jsx expressions

@DanielRosenwasser So far I've pushed the changes I made for object literals (this PR was helpful: #34870.
In my local branch, I have changes for the remaining three but wanted to make sure I'm on the right track before proceeding further.

@sandersn sandersn added the For Backlog Bug PRs that fix a backlog bug label Feb 3, 2020
@sandersn
Copy link
Member

Reviewers box is broken, but @elibarzilay and @weswigham, you might take a look too.

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Looks like a straightforward reapplication of #35586 to me - if we keep using this pattern, we should consider extracting the logic into a parseExpectedClosingToken(kind, openTokenPos) type helper.

@sheonhan
Copy link
Contributor Author

@weswigham Sounds good. I can extract it out and use the same pattern for other cases

@sandersn sandersn merged commit b014e2b into microsoft:master Mar 12, 2020
sheetalkamat added a commit that referenced this pull request Mar 13, 2020
@sheonhan sheonhan deleted the fix-35597 branch March 13, 2020 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Generalize missing token hints to more constructs
4 participants