Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
proto._stepNcheck = function _stepNcheck(step) {
// print instruction
// this._t.pass(colors.brightBlue(step.instruction))
this._t.pass(colors.brightBlue(step.line))
this._cu.next();
this._checkRegs(step.regs)
}
_default: function(s, info) {
var nextToken = info.tokens[info.tokenIndex + 1]
// show keys of object literals and json in different color
return (nextToken && nextToken.type === 'Punctuator' && nextToken.value === ':')
? colors.brightBlue(s)
: colors.brightGreen(s)
}
}
function tableize(step) {
function toString(acc, k) {
if (k === 'eip') return acc;
var d = step.diff[k];
return acc + ' ' + k + ': ' + d.prev.hex + ' -> ' + d.curr.hex;
}
var diffString = step.diff
? Object.keys(step.diff).reduce(toString, '')
: ''
var m = step.instruction.match(/^([a-f0-9]{2} )+/);
var opcodes = m[0].trim()
, inst = step.instruction.replace(opcodes, '').trim();
return [ colors.brightBlue(opcodes), colors.green(inst), colors.brightBlack(';' + diffString) ];
}
function formatChange(key, prevValue, value, diffopts) {
return format('%s %s: %s', colors.brightBlue('~'), key, diffValues(prevValue, value, diffopts));
}
function highlightDiffInd(line, matches) {
var highlighted = colors.brightBlue(matches[1])
var code = matches[2]
return code ? highlighted + tryHighlight(code) : highlighted
}
.forEach(function(name) {
var cmd = repl.commands[name]
, help = cmd.help || ''
, formattedName = colors.brightBlue(utl.pad(name, 15, ' '));
log.print('%s %s\n', formattedName, help);
});
this.displayPrompt();