[Mlir-commits] [mlir] 999fb7d - [mlir][vscode] Don't inject inside strings

Jacques Pienaar llvmlistbot at llvm.org
Wed Mar 16 21:58:08 PDT 2022


Author: Jacques Pienaar
Date: 2022-03-16T21:57:56-07:00
New Revision: 999fb7d0450a804f3eb0d16d2853e8667658f39e

URL: https://github.com/llvm/llvm-project/commit/999fb7d0450a804f3eb0d16d2853e8667658f39e
DIFF: https://github.com/llvm/llvm-project/commit/999fb7d0450a804f3eb0d16d2853e8667658f39e.diff

LOG: [mlir][vscode] Don't inject inside strings

Avoids matching R"mlir( while already inside a string.

Added: 
    

Modified: 
    mlir/utils/vscode/cpp-grammar.json
    mlir/utils/vscode/package.json

Removed: 
    


################################################################################
diff  --git a/mlir/utils/vscode/cpp-grammar.json b/mlir/utils/vscode/cpp-grammar.json
index c39f6dbb56fc5..36063c6a5210b 100644
--- a/mlir/utils/vscode/cpp-grammar.json
+++ b/mlir/utils/vscode/cpp-grammar.json
@@ -1,6 +1,6 @@
 {
   "scopeName": "source.cpp.mlir",
-  "injectionSelector": "L:source.cpp",
+  "injectionSelector": "L:source.cpp -string.quoted.double.cpp -string.quoted.double.raw",
   "patterns": [
     {
       "include": "#mlir-raw-string"

diff  --git a/mlir/utils/vscode/package.json b/mlir/utils/vscode/package.json
index ebb6487d43744..e45ce4cd4ea5e 100644
--- a/mlir/utils/vscode/package.json
+++ b/mlir/utils/vscode/package.json
@@ -2,7 +2,7 @@
   "name": "vscode-mlir",
   "displayName": "MLIR",
   "description": "MLIR Language Extension",
-  "version": "0.0.3",
+  "version": "0.0.4",
   "publisher": "llvm-vs-code-extensions",
   "homepage": "https://mlir.llvm.org/",
   "icon": "icon.png",


        


More information about the Mlir-commits mailing list