potentially use sprintf function.
This commit is contained in:
parent
318bc09cf2
commit
b41ac01700
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue