potentially use sprintf function.
This commit is contained in:
parent
318bc09cf2
commit
b41ac01700
|
@ -553,15 +553,15 @@ Tput.prototype._compile = function(val) {
|
|||
// operator.
|
||||
// e.g. %:-d %+d %#x %+10d
|
||||
if (read(/^%(:-|[+# ])?(\d+(?:\.\d+)?)?([doxXs])/)) {
|
||||
// var flag = cap[1]
|
||||
// , width = cap[2]
|
||||
// , type = cap[3];
|
||||
// echo('sprintf("'+ cap[0].replace(':-', '-') + '", stack.pop())');
|
||||
// var flag = cap[1], width = cap[2], type = cap[3];
|
||||
echo('stack.pop()');
|
||||
continue;
|
||||
}
|
||||
|
||||
// %c print pop() like %c in printf
|
||||
if (read(/^%c/)) {
|
||||
// echo('sprintf("%c", stack.pop())');
|
||||
echo('stack.pop()');
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue