Skip to content

Commit a9660fe

Browse files
committed
Rename str to codepoints
1 parent fa0cb68 commit a9660fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

parse-css.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ function asciiCaselessMatch(s1, s2) {
7979
}
8080

8181
var tokenize = (function () {
82-
let str;
82+
let codepoints;
8383
let i;
8484
let tokens;
8585
let code;
8686

8787
function codepoint(i) {
88-
if(i >= str.length) {
88+
if(i >= codepoints.length) {
8989
return 0;
9090
}
91-
return str[i];
91+
return codepoints[i];
9292
}
9393
function next(num) {
9494
if(num === undefined)
@@ -463,7 +463,7 @@ var tokenize = (function () {
463463

464464

465465
function tokenize(input) {
466-
str = preprocess(input);
466+
codepoints = preprocess(input);
467467
i = -1;
468468
tokens = [];
469469
code;
@@ -476,7 +476,7 @@ var tokenize = (function () {
476476
break;
477477
}
478478
iterationCount++;
479-
if(iterationCount > str.length*2) throw new Error("I'm infinite-looping!");
479+
if(iterationCount > codepoints.length*2) throw new Error("I'm infinite-looping!");
480480
}
481481
return tokens;
482482
}

0 commit comments

Comments
 (0)