@wokwi/gcc-output-parser
Advanced tools
Comparing version 0.1.1 to 0.2.0
export interface Message { | ||
filename: string; | ||
line: string; | ||
column: string; | ||
line: number; | ||
column: number; | ||
type: string; | ||
@@ -12,2 +12,5 @@ subtype?: string; | ||
// Length in characters of the token where the error has occurred | ||
tokenLength?: number; | ||
adjustedColumn?: number; | ||
@@ -14,0 +17,0 @@ startIndex: number; |
@@ -15,5 +15,5 @@ 'use strict'; | ||
var match = null; | ||
var deepRegex = /([^:^\r?\n]+):(\d+):(\d+):\s(\w+\s*\w*):\s(.+)\r?\n(\s+)(.*)\s+\^+/gm; | ||
// ^ ^ ^ ^ ^ ^ ^ | ||
// | | | | | | +- affected code | ||
var deepRegex = /([^:^\r?\n]+):(\d+):(\d+):\s(\w+\s*\w*):\s(.+)\r?\n(\s+)(.*)\s+(\^~*)/gm; | ||
// ^ ^ ^ ^ ^ ^ ^ ^ | ||
// | | | | | | +- affected code +- token marker | ||
// | | | | | +- whitespace before code | ||
@@ -20,0 +20,0 @@ // | | | | +- message text |
@@ -13,2 +13,5 @@ 'use strict'; | ||
this.code = components[7] ? components[7] : ''; | ||
if (components[8]) { | ||
this.tokenLength = components[8].length; | ||
} | ||
@@ -15,0 +18,0 @@ this.adjustedColumn = this.column - this.codeWhitespace.length; |
{ | ||
"name": "@wokwi/gcc-output-parser", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "GCC output parsing library", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -1,2 +0,2 @@ | ||
# gcc output parser library | ||
# GCC Output Parser Library | ||
@@ -16,3 +16,3 @@ [![Build Status](https://travis-ci.org/wokwi/gcc-output-parser.svg?branch=master)](https://travis-ci.org/wokwi/gcc-output-parser) | ||
```javascript | ||
var parser = require('@wokwi/gcc-output-parser'); | ||
const parser = require('@wokwi/gcc-output-parser'); | ||
@@ -22,3 +22,3 @@ console.log(parser.parseString(gccOutput)); | ||
example output: | ||
Example output: | ||
@@ -25,0 +25,0 @@ ```javascript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6879
144