aboutsummaryrefslogtreecommitdiff
path: root/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'code/src')
-rw-r--r--code/src/main.ts8
1 files changed, 4 insertions, 4 deletions
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] = []