Skip to content

Commit 13d3711

Browse files
committed
parse compiler problems in linker log
1 parent 5cbedb6 commit 13d3711

2 files changed

Lines changed: 34 additions & 5 deletions

File tree

package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,5 @@
161161
"string.eide.open_docs": "Learn More",
162162
"string.eide.open_docs.detail": "Click the link will open the home page that may help you learn more about usage.\n[Embedded IDE](https://em-ide.com/)",
163163

164-
"string.eide.project.welcome": "There are no projects in this workspace !\n[Open Project](command:eide.operation.open_project)\n[Create Project](command:eide.operation.new_project)\n[Import Project](command:eide.operation.import_project)"
164+
"string.eide.project.welcome": "There are no projects in this workspace !\n[Open Project](command:eide.operation.open_project)\n[New Project](command:eide.operation.new_project)\n[Import Project](command:eide.operation.import_project)"
165165
}

src/ProblemMatcher.ts

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,53 @@ function parseLogLines(file: File): string[] {
1818

1919
try {
2020

21+
const fileLines = file.Read().split(/\r\n|\n/);
22+
23+
//
24+
// cc logs
25+
//
2126
let logStarted = false;
2227
let logEnd = false;
2328

24-
file.Read().split(/\r\n|\n/).forEach((line, idx) => {
29+
fileLines.forEach((line, idx) => {
2530

2631
if (logEnd)
2732
return;
2833

29-
if (logStarted) {
34+
if (!logStarted) {
35+
if (line.startsWith('>>> cc')) {
36+
logStarted = true;
37+
}
38+
} else {
3039
if (line.startsWith('>>>')) {
3140
logEnd = true;
3241
} else {
3342
ccLogLines.push(line);
3443
}
35-
} else {
36-
if (line.startsWith('>>> cc')) {
44+
}
45+
});
46+
47+
//
48+
// ld logs
49+
//
50+
logStarted = false;
51+
logEnd = false;
52+
53+
fileLines.forEach((line, idx) => {
54+
55+
if (logEnd)
56+
return;
57+
58+
if (!logStarted) {
59+
if (line.startsWith('>>> ld')) {
3760
logStarted = true;
3861
}
62+
} else {
63+
if (line.startsWith('>>>')) {
64+
logEnd = true;
65+
} else {
66+
ccLogLines.push(line);
67+
}
3968
}
4069
});
4170

0 commit comments

Comments
 (0)