aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/.vscode/launch.json2
-rw-r--r--code/src/main.ts8
2 files changed, 5 insertions, 5 deletions
diff --git a/code/.vscode/launch.json b/code/.vscode/launch.json
index 5d75a92e8..64f2c3693 100644
--- a/code/.vscode/launch.json
+++ b/code/.vscode/launch.json
@@ -9,7 +9,7 @@
9 "type": "extensionHost", 9 "type": "extensionHost",
10 "request": "launch", 10 "request": "launch",
11 "runtimeExecutable": "${execPath}", 11 "runtimeExecutable": "${execPath}",
12 "args": ["--extensionDevelopmentPath=${workspaceRoot}" ], 12 "args": ["--extensionDevelopmentPath=${workspaceRoot}"],
13 "stopOnEntry": false, 13 "stopOnEntry": false,
14 "sourceMaps": true, 14 "sourceMaps": true,
15 "outFiles": [ "${workspaceRoot}/out/src/**/*.js" ], 15 "outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
diff --git a/code/src/main.ts b/code/src/main.ts
index dfb005c09..75a824b7b 100644
--- a/code/src/main.ts
+++ b/code/src/main.ts
@@ -12,7 +12,6 @@ let uris = {
12 12
13export function activate(context: vscode.ExtensionContext) { 13export function activate(context: vscode.ExtensionContext) {
14 let textDocumentContentProvider = new TextDocumentContentProvider() 14 let textDocumentContentProvider = new TextDocumentContentProvider()
15
16 let dispose = (disposable) => { 15 let dispose = (disposable) => {
17 context.subscriptions.push(disposable); 16 context.subscriptions.push(disposable);
18 } 17 }
@@ -25,7 +24,6 @@ export function activate(context: vscode.ExtensionContext) {
25 let emitter = textDocumentContentProvider.eventEmitter 24 let emitter = textDocumentContentProvider.eventEmitter
26 emitter.fire(uris.syntaxTree) 25 emitter.fire(uris.syntaxTree)
27 let syntax = activeSyntax() 26 let syntax = activeSyntax()
28 console.log(syntax.highlight());
29 setHighlights(vscode.window.activeTextEditor, syntax.highlight()) 27 setHighlights(vscode.window.activeTextEditor, syntax.highlight())
30 }) 28 })
31 29
@@ -89,7 +87,10 @@ function documentToFile(disposables: vscode.Disposable[], onChange) {
89 } 87 }
90 88
91 function createFile(text: String) { 89 function createFile(text: String) {
92 return new backend.RustFile(text) 90 console.time("parsing")
91 let res = new backend.RustFile(text);
92 console.timeEnd("parsing")
93 return res
93 } 94 }
94 95
95 vscode.workspace.onDidChangeTextDocument((event: vscode.TextDocumentChangeEvent) => { 96 vscode.workspace.onDidChangeTextDocument((event: vscode.TextDocumentChangeEvent) => {
@@ -159,7 +160,6 @@ function setHighlights(
159 editor: vscode.TextEditor, 160 editor: vscode.TextEditor,
160 highlihgs: Array<[number, number, string]> 161 highlihgs: Array<[number, number, string]>
161) { 162) {
162 console.log("setHighlight");
163 let byTag = {} 163 let byTag = {}
164 for (let tag in decorations) { 164 for (let tag in decorations) {
165 byTag[tag] = [] 165 byTag[tag] = []