clean up old code.

This commit is contained in:
Christopher Jeffrey 2013-07-14 06:30:09 -05:00
parent 363bc44caa
commit d5f3874105

View File

@ -579,16 +579,12 @@ Tput.prototype._compile = function(val, key) {
}
}
function read(regex, buf) {
function read(regex) {
cap = regex.exec(val);
if (!cap) return;
val = val.substring(cap[0].length);
ch = op = i = v = cap[1];
//if (buf == null) {
clear();
//} else if (typeof buf === 'string') {
//buff += buf;
//}
clear();
return cap;
}
@ -597,12 +593,10 @@ Tput.prototype._compile = function(val, key) {
code = code.slice(0, -1);
}
code += c;
// code += ';' + c;
}
function expr(c) {
code += c + ',';
// code += '(' + c + '),';
}
function echo(c) {
@ -610,7 +604,6 @@ Tput.prototype._compile = function(val, key) {
}
function print(c) {
//buff += c;
echo('"' + c + '"');
}
@ -624,7 +617,7 @@ Tput.prototype._compile = function(val, key) {
while (val) {
// '\e' -> ^[
if (read(/^\\e/i)) { // , '\x1b')) {
if (read(/^\\e/i)) {
print('\\x1b');
continue;
}