Skip to content

Commit

Permalink
Fix to remove superfluous function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 20, 2017
1 parent 73eb98c commit 103da08
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@ function wrap(tree, file) {
}

function text(node) {
var start = pos.start(node);
parser._processToken({
type: CHARACTER_TOKEN,
chars: node.value,
location: {
line: pos.start(node).line,
col: pos.start(node).column,
startOffset: pos.start(node).offset,
line: start.line,
col: start.column,
startOffset: start.offset,
endOffset: pos.end(node).offset
}
});
Expand All @@ -154,13 +155,14 @@ function wrap(tree, file) {
}

function comment(node) {
var start = pos.start(node);
parser._processToken({
type: COMMENT_TOKEN,
data: node.value,
location: {
line: pos.start(node).line,
col: pos.start(node).column,
startOffset: pos.start(node).offset,
line: start.line,
col: start.column,
startOffset: start.offset,
endOffset: pos.end(node).offset
}
});
Expand Down

0 comments on commit 103da08

Please sign in to comment.