From 87b5e14c75dbc02b5bc610dfa33d5789570df5db Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 13:41:30 +0300 Subject: Fix indexing errors --- code/.vscode/launch.json | 2 +- code/src/main.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'code') 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 @@ "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceRoot}" ], + "args": ["--extensionDevelopmentPath=${workspaceRoot}"], "stopOnEntry": false, "sourceMaps": true, "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 = { export function activate(context: vscode.ExtensionContext) { let textDocumentContentProvider = new TextDocumentContentProvider() - let dispose = (disposable) => { context.subscriptions.push(disposable); } @@ -25,7 +24,6 @@ export function activate(context: vscode.ExtensionContext) { let emitter = textDocumentContentProvider.eventEmitter emitter.fire(uris.syntaxTree) let syntax = activeSyntax() - console.log(syntax.highlight()); setHighlights(vscode.window.activeTextEditor, syntax.highlight()) }) @@ -89,7 +87,10 @@ function documentToFile(disposables: vscode.Disposable[], onChange) { } function createFile(text: String) { - return new backend.RustFile(text) + console.time("parsing") + let res = new backend.RustFile(text); + console.timeEnd("parsing") + return res } vscode.workspace.onDidChangeTextDocument((event: vscode.TextDocumentChangeEvent) => { @@ -159,7 +160,6 @@ function setHighlights( editor: vscode.TextEditor, highlihgs: Array<[number, number, string]> ) { - console.log("setHighlight"); let byTag = {} for (let tag in decorations) { byTag[tag] = [] -- cgit v1.2.3