Skip to content

Commit dbaab07

Browse files
committed
Remove obsolete line number related code
1 parent b643de3 commit dbaab07

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

parse-css.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,6 @@ function tokenize(str) {
9292
var tokens = [];
9393
var code;
9494

95-
// Line number information.
96-
var line = 0;
97-
var column = 0;
98-
// The only use of lastLineLength is in reconsume().
99-
var lastLineLength = 0;
100-
var incrLineno = function() {
101-
line += 1;
102-
lastLineLength = column;
103-
column = 0;
104-
};
105-
var locStart = {line:line, column:column};
106-
10795
var codepoint = function(i) {
10896
if(i >= str.length) {
10997
return 0;
@@ -122,21 +110,11 @@ function tokenize(str) {
122110
num = 1;
123111
i += num;
124112
code = codepoint(i);
125-
if(newline(code)) incrLineno();
126-
else column += num;
127113
//console.log('Consume '+i+' '+String.fromCharCode(code) + ' 0x' + code.toString(16));
128114
return true;
129115
};
130116
var reconsume = function() {
131117
i -= 1;
132-
if (newline(code)) {
133-
line -= 1;
134-
column = lastLineLength;
135-
} else {
136-
column -= 1;
137-
}
138-
locStart.line = line;
139-
locStart.column = column;
140118
return true;
141119
};
142120
var eof = function(codepoint) {

0 commit comments

Comments
 (0)