diff --git a/src/features/linter-provider.ts b/src/features/linter-provider.ts
index 39b3f4ac..7ca33531 100644
--- a/src/features/linter-provider.ts
+++ b/src/features/linter-provider.ts
@@ -19,7 +19,7 @@ export default class FortranLintingProvider {
private doModernFortranLint(textDocument: vscode.TextDocument) {
- const errorRegex: RegExp = /^([A-Z]:\\)*([^:]*):([0-9]+):([0-9]+):\n+(.*)\n.*\n(Error|Warning|Fatal Error):\s(.*)$/gm;
+ const errorRegex: RegExp = /^([a-zA-Z]:\\)*([^:]*):([0-9]+):([0-9]+):\s+(.*)\s+.*?\s+(Error|Warning|Fatal Error):\s(.*)$/gm;
if (textDocument.languageId !== LANGUAGE_ID) {
return;
diff --git a/src/lib/helper.ts b/src/lib/helper.ts
index 1d2549e9..69195dd8 100644
--- a/src/lib/helper.ts
+++ b/src/lib/helper.ts
@@ -82,6 +82,9 @@ export const _loadDocString = (keyword: string) => {
}
export const getIncludeParams = (paths: string[]) => {
+ if (paths.length == 0) {
+ return ""
+ }
return "-I " + paths.join(" ");
};
diff --git a/syntaxes/fortran.tmLanguage b/syntaxes/fortran.tmLanguage
index 75cb13c6..335a66ca 100644
--- a/syntaxes/fortran.tmLanguage
+++ b/syntaxes/fortran.tmLanguage
@@ -192,7 +192,7 @@
comment
statements controling the flow of the program
match
- \b(?i:(go\s*to|assign|to|if|then|else|elseif|end\s*if|continue|stop|pause|do|end\s*do|while|cycle))\b
+ \b(?i:(go\s*to|assign|to|if|then|else|elseif|end\s*if|continue|stop|pause|do|end\s*do|while|cycle|exit))\b
name
keyword.control.fortran