Skip to content

Support getOccurrencesAtPosition for 'throw' keywords.#776

Merged
DanielRosenwasser merged 4 commits into
masterfrom
getOccurrencesThrow
Sep 30, 2014
Merged

Support getOccurrencesAtPosition for 'throw' keywords.#776
DanielRosenwasser merged 4 commits into
masterfrom
getOccurrencesThrow

Conversation

@DanielRosenwasser

Copy link
Copy Markdown
Member

Also revised behavior for 'return' keywords in that when the position resides on a 'return' statement, 'throw' keywords in the same function scope that are not within a try-block are also highlighted.

Fixes #768

Also revised behavior for 'return' keywords in that when the position
resides on a 'return' statement, 'throw' keywords in the same
function scope that are not within a try-block are also highlighted.
Comment thread src/services/services.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this code looks duplicated.

@CyrusNajmabadi

Copy link
Copy Markdown
Contributor

👍

A try-block now only owns a throw statement if its try statement has a catch-clause.
Comment thread src/services/services.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I find this comment a little misleading... What do you mean by next owner? Really you want to convey that you are only counting "uncaught" throw statements (from the perspective of the initial Node).

@JsonFreeman

Copy link
Copy Markdown
Contributor

👍

DanielRosenwasser added a commit that referenced this pull request Sep 30, 2014
Support getOccurrencesAtPosition for 'throw' keywords.
@DanielRosenwasser DanielRosenwasser merged commit 8714673 into master Sep 30, 2014
@DanielRosenwasser DanielRosenwasser deleted the getOccurrencesThrow branch September 30, 2014 21:06
@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.

highligting for return should also highlight throw statements

3 participants