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

Allow casting without input containing catch/finally. #1

Merged

Conversation

rwjblue
Copy link
Collaborator

@rwjblue rwjblue commented May 27, 2014

The RegExp that was used as a quick check filter was only looking for catch and finally. This meant that it would not recast any of the other identifiers if catch/finally did not also exist in the input.

Changes:

  • Added tests for the individual literals (in both object literal and object member formats).
  • Build the RegExp dynamically based on the actual literals being matched. This could have been done inline, but I believe that we will likely have other scenarios to check, and will likely need to have the ability to construct more complicationed RegExps anyways.

The RegExp that was used as a quick check filter was only looking for `catch`
and `finally`. This meant that it would not recast any of the other
identifiers if `catch`/`finally` did not also exist in the output.

Changes:

* Added tests for the individual literals (in both object literal and
  object member formats).
* Build the RegExp dynamically based on the actual literals being
  matched. This could have been done inline, but I believe that we will
  likely have other scenarios to check, and will likely need to have the
  ability to construct more complicationed RegExps anyways.
@stefanpenner
Copy link
Owner

Good catch

stefanpenner added a commit that referenced this pull request May 27, 2014
Allow casting without input containing catch/finally.
@stefanpenner stefanpenner merged commit fb75bc7 into stefanpenner:master May 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants