File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -92,18 +92,6 @@ function tokenize(str) {
92
92
var tokens = [ ] ;
93
93
var code ;
94
94
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
-
107
95
var codepoint = function ( i ) {
108
96
if ( i >= str . length ) {
109
97
return 0 ;
@@ -122,21 +110,11 @@ function tokenize(str) {
122
110
num = 1 ;
123
111
i += num ;
124
112
code = codepoint ( i ) ;
125
- if ( newline ( code ) ) incrLineno ( ) ;
126
- else column += num ;
127
113
//console.log('Consume '+i+' '+String.fromCharCode(code) + ' 0x' + code.toString(16));
128
114
return true ;
129
115
} ;
130
116
var reconsume = function ( ) {
131
117
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 ;
140
118
return true ;
141
119
} ;
142
120
var eof = function ( codepoint ) {
You can’t perform that action at this time.
0 commit comments