aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorSeivan Heidari <[email protected]>2019-11-18 01:37:18 +0000
committerSeivan Heidari <[email protected]>2019-11-18 01:37:18 +0000
commite5bbb476800c9bf24820701ec9252153ba07cf6a (patch)
tree3cf9360d404fa638726fd42b81c6bc4a724a78f1 /editors/code/src
parent166636ba77adcf5bf2c4ef935e9aa75e20f25e10 (diff)
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 98099872c..8f288d761 100644
--- a/editors/code/src/scopes.ts
+++ b/editors/code/src/scopes.ts
@@ -1,4 +1,5 @@
1import * as fs from 'fs'; 1import * as fs from 'fs';
2import * as jsonc from 'jsonc-parser';
2import * as path from 'path'; 3import * as path from 'path';
3import * as vscode from 'vscode'; 4import * as vscode from 'vscode';
4 5
@@ -140,7 +141,6 @@ function readFileText(filePath: string): string {
140 return fs.readFileSync(filePath, 'utf8'); 141 return fs.readFileSync(filePath, 'utf8');
141} 142}
142 143
143// Might need to replace with JSONC if a theme contains comments.
144function parseJSON(content: string): any { 144function parseJSON(content: string): any {
145 return JSON.parse(content); 145 return jsonc.parse(content);
146} 146}