Much more optimized error regex

This commit is contained in:
Noah Santschi-Cooney 2018-06-17 18:08:28 +01:00
parent 960597e324
commit 7dd1699dbe
No known key found for this signature in database
GPG key ID: 3B22282472C8AE48
2 changed files with 5 additions and 1 deletions

View file

@ -4,7 +4,7 @@ import { TextDocument, Diagnostic, DiagnosticSeverity, Range } from 'vscode-lang
import { exec } from 'child_process'
import * as path from 'path'
const reDiag = /(ERROR|WARNING): (?:\d):(\d+): '(?:.*)' : (.+)/
const reDiag = /^(ERROR|WARNING): ([^?<>:*|"]+?):(\d+): (?:'.*?' : )?(.+)$/
const reVersion = /#version [\d]{3}/
const reInclude = /^(?: |\t)*(?:#include) "((?:\/[\S]+)+\.(?:glsl))"$/
const include = '#extension GL_GOOGLE_include_directive : require'

View file

@ -22,6 +22,10 @@ connection.onInitialize((params): vsclang.InitializeResult => {
};
});
connection.onExit(() => {
})
documents.onDidOpen((event) => {
preprocess(event.document)
})