0.1.1 • Published 11 years ago
log-syntax-error v0.1.1
log-syntax-error
Generates a block of text highlighting a syntax error, suitable for printing to a console.
Installation
npm install log-syntax-errorUsage
var block = logSyntaxError( code, line, column, options );
console.error( block );codeis some source codelineis the (one-based) line number of the errorcolumn(optional) is the (zero-based) column number of the erroroptions(optional)buffer- the number of lines to include either side of the error. Defaults to2.
License
MIT.