potentially use sprintf function.

This commit is contained in:
Christopher Jeffrey 2013-02-24 11:20:30 -06:00
parent 318bc09cf2
commit b41ac01700
1 changed files with 3 additions and 3 deletions

View File

@ -553,15 +553,15 @@ Tput.prototype._compile = function(val) {
// operator. // operator.
// e.g. %:-d %+d %#x %+10d // e.g. %:-d %+d %#x %+10d
if (read(/^%(:-|[+# ])?(\d+(?:\.\d+)?)?([doxXs])/)) { if (read(/^%(:-|[+# ])?(\d+(?:\.\d+)?)?([doxXs])/)) {
// var flag = cap[1] // echo('sprintf("'+ cap[0].replace(':-', '-') + '", stack.pop())');
// , width = cap[2] // var flag = cap[1], width = cap[2], type = cap[3];
// , type = cap[3];
echo('stack.pop()'); echo('stack.pop()');
continue; continue;
} }
// %c print pop() like %c in printf // %c print pop() like %c in printf
if (read(/^%c/)) { if (read(/^%c/)) {
// echo('sprintf("%c", stack.pop())');
echo('stack.pop()'); echo('stack.pop()');
continue; continue;
} }