From: Oliver Scherer Date: Sun, 15 Dec 2019 16:12:52 +0000 (+0100) Subject: Add a rudimentary json regex to get at information like `endLine` X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=eed57dcded5eb661d05c23a642ca03f9b87391fa;p=rust.git Add a rudimentary json regex to get at information like `endLine` --- diff --git a/editors/code/package.json b/editors/code/package.json index 43db61a8bc0..ebb1b4a98be 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -313,6 +313,18 @@ "column": 3 } ] + }, + { + "name": "rustc-json", + "patterns": [{ + "regexp": "^.*\"message\":{\"message\":\"([^\"]*).*?\"file_name\":\"([^\"]+).*?\"line_start\":(\\d+).*?\"line_end\":(\\d+).*?\"column_start\":(\\d+).*?\"column_end\":(\\d+).*}$", + "message": 1, + "file": 2, + "line": 3, + "endLine": 4, + "column": 5, + "endColumn": 6 + }] } ], "problemMatchers": [ @@ -324,6 +336,14 @@ ], "pattern": "$rustc" }, + { + "name": "rustc-json", + "fileLocation": [ + "relative", + "${workspaceRoot}" + ], + "pattern": "$rustc-json" + }, { "name": "rustc-watch", "fileLocation": [