Skip to content

Commit

Permalink
Compartmentalizing the code that parses target path components.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsfields committed Jul 16, 2017
1 parent 0bf78e1 commit f54ba3b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/tokenizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,7 @@ class Tokenizer {
if (isInString) throw this.error({ value });

if (type === Token.target) {
if (value.length > 0) {
const num = Number(value);
if (!isNaN(num)) value = num;
}

this.current = {
type,
value,
};

this._handleTargetPart(type, value);
return true;
}

Expand Down

0 comments on commit f54ba3b

Please sign in to comment.