(annotations: any[])
| 60 | } |
| 61 | |
| 62 | function compatAnnotations(annotations: any[]): CodeAnnotation[] { |
| 63 | const newAnnotations: CodeAnnotation[] = [] |
| 64 | for (const a of annotations) { |
| 65 | const { name, query, ranges } = a |
| 66 | for (const r of ranges) { |
| 67 | if (r.lineNumber) { |
| 68 | const { lineNumber, fromColumn, toColumn } = r |
| 69 | newAnnotations.push({ |
| 70 | name, |
| 71 | query, |
| 72 | lineNumber, |
| 73 | fromColumn, |
| 74 | toColumn, |
| 75 | }) |
| 76 | } else { |
| 77 | const { fromLineNumber, toLineNumber } = r |
| 78 | newAnnotations.push({ |
| 79 | name, |
| 80 | query, |
| 81 | fromLineNumber, |
| 82 | toLineNumber, |
| 83 | }) |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | return newAnnotations |
| 88 | } |
| 89 | |
| 90 | // group the Lines into one array |
| 91 | function joinLines(lines: Lines): AnyToken[] { |
no outgoing calls
no test coverage detected
searching dependent graphs…