|
|
|
@ -197,11 +197,6 @@ module.exports = function(ast, options) {
|
|
|
|
|
' ip++;',
|
|
|
|
|
' break;',
|
|
|
|
|
'',
|
|
|
|
|
' case ' + op.NIP_CURR_POS + ':', // NIP_CURR_POS
|
|
|
|
|
' peg$currPos = stack.splice(-2, 1)[0];',
|
|
|
|
|
' ip++;',
|
|
|
|
|
' break;',
|
|
|
|
|
'',
|
|
|
|
|
' case ' + op.APPEND + ':', // APPEND
|
|
|
|
|
' stack[stack.length - 2].push(stack.pop());',
|
|
|
|
|
' ip++;',
|
|
|
|
@ -482,13 +477,6 @@ module.exports = function(ast, options) {
|
|
|
|
|
ip++;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case op.NIP_CURR_POS: // NIP_CURR_POS
|
|
|
|
|
value = stack.pop();
|
|
|
|
|
parts.push('peg$currPos = ' + stack.pop() + ';');
|
|
|
|
|
parts.push(stack.push(value));
|
|
|
|
|
ip++;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case op.APPEND: // APPEND
|
|
|
|
|
value = stack.pop();
|
|
|
|
|
parts.push(stack.top() + '.push(' + value + ');');
|
|
|
|
|