Skip to content
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

Better error recovery for when an arrow function is missing a curly brace. #28

Closed
wants to merge 2 commits into from

Conversation

DanielRosenwasser
Copy link
Member

Handle the following:

a => 
    var v = 0;
}

as

a => {
    var v = 0;
}

while still reporting an error for a missing {,

@@ -299,6 +299,12 @@ module ts {
Count // Number of parsing contexts
}

enum Tristate {
Copy link
Contributor

Choose a reason for hiding this comment

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

TristateBoolean, or just Troolean (jk, don't actually name it that).

Also, the order should probably be False, Maybe, True

Copy link
Member Author

Choose a reason for hiding this comment

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

So one might say that you're...trollean about trooleans?

😎

@mhegazy
Copy link
Contributor

mhegazy commented Jul 19, 2014

👍

@DanielRosenwasser DanielRosenwasser deleted the lambdaMissingCurly branch July 19, 2014 00:43
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
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.

None yet

3 participants