Skip to content

Commit

Permalink
[[CHORE]] Remove unnecessary branch
Browse files Browse the repository at this point in the history
Currently, the `setExported` method only makes the specified binding as
"used." This is unnecessary in this context because when `expression`
processes an IdentifierReference, it does the same. Remove the branch.
  • Loading branch information
jugglinmike committed Sep 21, 2020
1 parent 10daf79 commit 737524d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -5633,8 +5633,6 @@ var JSHINT = (function() {

stmt("export", function(context) {
var ok = true;
var token;
var identifier;
var moduleSpecifier;
context = context | prodParams.export;

Expand Down Expand Up @@ -5682,11 +5680,7 @@ var JSHINT = (function() {
advance("class");
state.syntax["class"].fud(context);
} else {
token = expression(context, 10);
if (token.identifier) {
identifier = token.value;
state.funct["(scope)"].setExported(identifier, token);
}
expression(context, 10);
}
return this;
}
Expand Down

0 comments on commit 737524d

Please sign in to comment.