Skip to content

Commit 8d1fde8

Browse files
author
Tab Atkins
committed
Inline the char() function to its one use.
1 parent 36773a1 commit 8d1fde8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tokenizer.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ function tokenize(str, options) {
2323
var code;
2424
var currtoken;
2525

26-
var char = function() { return str.charCodeAt(i); };
2726
var next = function(num) { if(num === undefined) num = 1; return str.charCodeAt(i+num); };
2827
var consume = function(num) {
2928
if(num === undefined)
3029
num = 1;
3130
i += num;
32-
code = char();
31+
code = str.charCodeAt(i);
3332
//console.log('Consume '+i+' '+String.fromCharCode(code) + ' 0x' + code.toString(16));
3433
return true;
3534
};

0 commit comments

Comments
 (0)