فهرست منبع

Fix sourceMap functionality

arrkiin 8 سال پیش
والد
کامیت
f40f091421
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      .vscode/launch.json
  2. 2 2
      src/gdscript/diagnostic.ts

+ 1 - 1
.vscode/launch.json

@@ -10,7 +10,7 @@
             "args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
             "stopOnEntry": false,
             "sourceMaps": true,
-            "outFiles": ["${workspaceRoot}/out/src"],
+            "outFiles": ["${workspaceRoot}/out/src/**/*.js"],
             "preLaunchTask": "npm"
         },
         {

+ 2 - 2
src/gdscript/diagnostic.ts

@@ -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+]|\{.*?\}|\[.*?\]/))