mirror of
https://github.com/godotengine/godot-vscode-plugin.git
synced 2026-01-04 10:09:58 +03:00
Fix sourceMap functionality
This commit is contained in:
@@ -96,7 +96,7 @@ class GDScriptDiagnosticSeverity {
|
||||
diagnostics.push(new vscode.Diagnostic(new vscode.Range(i, semicolonIndex, i, semicolonIndex+1), "Statement contains a semicolon.", DiagnosticSeverity.Warning));
|
||||
} if (line.match(/[^#].*?/) && expectEndOfLine){
|
||||
if(!line.match(/.*?(\\|\:)/)){
|
||||
diagnostics.push(new vscode.Diagnostic(range, "': or /' expected at end of the line.", DiagnosticSeverity.Error));
|
||||
diagnostics.push(new vscode.Diagnostic(range, "': or \\' expected at end of the line.", DiagnosticSeverity.Error));
|
||||
expectEndOfLine = false;
|
||||
}
|
||||
if(line.match(/.*?\:/))
|
||||
@@ -106,7 +106,7 @@ class GDScriptDiagnosticSeverity {
|
||||
if(line.match(/(if|elif|else|for|while|func|class).*?\\/))
|
||||
expectEndOfLine = true;
|
||||
if(line.match(/(if|elif|else|for|while|func|class).*?/) && !line.match(/.*?(\\|\:)/))
|
||||
diagnostics.push(new vscode.Diagnostic(range, "': or /' expected at end of the line.", DiagnosticSeverity.Error));
|
||||
diagnostics.push(new vscode.Diagnostic(range, "': or \\' expected at end of the line.", DiagnosticSeverity.Error));
|
||||
else if(line.match(/(if|elif|while|func|class)\s*\:/))
|
||||
diagnostics.push(new vscode.Diagnostic(range, "Indentifier expected before ':'", DiagnosticSeverity.Error));
|
||||
else if(line.match(/[^\w]for[^\w]/) && !line.match(/\s+for\s\w+\s+in\s+[\w+]|\{.*?\}|\[.*?\]/))
|
||||
|
||||
Reference in New Issue
Block a user