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

Simplify some places in the compiler where we have esoteric declarations. #2162

Merged
merged 7 commits into from
Feb 27, 2015

Conversation

CyrusNajmabadi
Copy link
Contributor

No description provided.

case SyntaxKind.CatchClause:
return (<CatchClause>node.parent).name === node;
//case SyntaxKind.CatchClause:
// return (<CatchClause>node.parent).name === node;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove

var colonStart = skipTrivia(sourceFile.text, catchClause.name.end);
grammarErrorAtPos(sourceFile, colonStart, ":".length, Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation);
if (catchClause.variableDeclaration) {
if (catchClause.variableDeclaration.name.kind !== SyntaxKind.Identifier) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@JsonFreeman
Copy link
Contributor

👍

>:=> (line 30, col 8) to (line 30, col 23)
29 > } catch (e) {

~ => Pos: (424 to 424) SpanInfo: undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

i do not think this is correct. you can not put a breakpoint on "e".

CyrusNajmabadi added a commit that referenced this pull request Feb 27, 2015
Simplify some places in the compiler where we have esoteric declarations.
@CyrusNajmabadi CyrusNajmabadi merged commit f4158ee into master Feb 27, 2015
@CyrusNajmabadi CyrusNajmabadi deleted the declarations branch February 27, 2015 07:21
@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.

4 participants