diff options
author | Seivan Heidari <[email protected]> | 2019-11-18 01:37:18 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-18 01:37:18 +0000 |
commit | e5bbb476800c9bf24820701ec9252153ba07cf6a (patch) | |
tree | 3cf9360d404fa638726fd42b81c6bc4a724a78f1 /editors/code/src | |
parent | 166636ba77adcf5bf2c4ef935e9aa75e20f25e10 (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.ts | 4 |
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 @@ | |||
1 | import * as fs from 'fs'; | 1 | import * as fs from 'fs'; |
2 | import * as jsonc from 'jsonc-parser'; | ||
2 | import * as path from 'path'; | 3 | import * as path from 'path'; |
3 | import * as vscode from 'vscode'; | 4 | import * 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. | ||
144 | function parseJSON(content: string): any { | 144 | function parseJSON(content: string): any { |
145 | return JSON.parse(content); | 145 | return jsonc.parse(content); |
146 | } | 146 | } |