about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorSeivan Heidari <seivan.heidari@icloud.com>2019-11-18 02:37:18 +0100
committerSeivan Heidari <seivan.heidari@icloud.com>2019-11-18 02:37:18 +0100
commite5bbb476800c9bf24820701ec9252153ba07cf6a (patch)
tree3cf9360d404fa638726fd42b81c6bc4a724a78f1 /editors/code/src
parent166636ba77adcf5bf2c4ef935e9aa75e20f25e10 (diff)
downloadrust-e5bbb476800c9bf24820701ec9252153ba07cf6a.tar.gz
rust-e5bbb476800c9bf24820701ec9252153ba07cf6a.zip
Readding jsonc parser because of https://github.com/rust-analyzer/rust-analyzer/pull/2061\#discussion_r344783715
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/scopes.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/code/src/scopes.ts b/editors/code/src/scopes.ts
index 98099872cc7..8f288d7617b 100644
--- a/editors/code/src/scopes.ts
+++ b/editors/code/src/scopes.ts
@@ -1,4 +1,5 @@
 import * as fs from 'fs';
+import * as jsonc from 'jsonc-parser';
 import * as path from 'path';
 import * as vscode from 'vscode';
 
@@ -140,7 +141,6 @@ function readFileText(filePath: string): string {
     return fs.readFileSync(filePath, 'utf8');
 }
 
-// Might need to replace with JSONC if a theme contains comments.
 function parseJSON(content: string): any {
-    return JSON.parse(content);
+    return jsonc.parse(content);
 }