/gcc-output-parser

GCC error parsing library for Node.js

Primary LanguageJavaScript

GCC Output Parser Library

Build Status

Library which helps annotate/highlight gcc output.

Installation

$ npm install @wokwi/gcc-output-parser

Usage

const parser = require('@wokwi/gcc-output-parser');

console.log(parser.parseString(gccOutput));

Example output:

[ { filename: '/sketch/sketch.ino',
    line: 6,
    column: 3,
    type: 'error',
    text: "'digitalWire' was not declared in this scope",
    codeWhitespace: '   ',
    code: 'digitalWire(LED_BUILTIN, HIGH);',
    adjustedColumn: 0,
    startIndex: 47,
    endIndex: 162,
    parentFunction: 'void loop()'
} ]