Skip to content

Commit 103da08

Browse files
committed
Fix to remove superfluous function calls
1 parent 73eb98c commit 103da08

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,14 @@ function wrap(tree, file) {
130130
}
131131

132132
function text(node) {
133+
var start = pos.start(node);
133134
parser._processToken({
134135
type: CHARACTER_TOKEN,
135136
chars: node.value,
136137
location: {
137-
line: pos.start(node).line,
138-
col: pos.start(node).column,
139-
startOffset: pos.start(node).offset,
138+
line: start.line,
139+
col: start.column,
140+
startOffset: start.offset,
140141
endOffset: pos.end(node).offset
141142
}
142143
});
@@ -154,13 +155,14 @@ function wrap(tree, file) {
154155
}
155156

156157
function comment(node) {
158+
var start = pos.start(node);
157159
parser._processToken({
158160
type: COMMENT_TOKEN,
159161
data: node.value,
160162
location: {
161-
line: pos.start(node).line,
162-
col: pos.start(node).column,
163-
startOffset: pos.start(node).offset,
163+
line: start.line,
164+
col: start.column,
165+
startOffset: start.offset,
164166
endOffset: pos.end(node).offset
165167
}
166168
});

0 commit comments

Comments
 (0)