UNPKG

coc-mlir

Version:

MLIR Language Extension

38 lines 1.97 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.activate = void 0; const vscode = require("coc.nvim"); // import {registerMLIRExtensions} from './MLIR/mlir'; const mlirContext_1 = require("./mlirContext"); // TODO: https://github.com/neoclide/coc.nvim/discussions/4918 // import {registerPDLLExtensions} from './PDLL/pdll'; /** * This method is called when the extension is activated. The extension is * activated the very first time a command is executed. */ function activate(context) { const outputChannel = vscode.window.createOutputChannel('MLIR'); context.subscriptions.push(outputChannel); const mlirContext = new mlirContext_1.MLIRContext(); context.subscriptions.push(mlirContext); // Initialize the commands of the extension. context.subscriptions.push(vscode.commands.registerCommand('mlir.restart', () => __awaiter(this, void 0, void 0, function* () { // Dispose and reactivate the context. mlirContext.dispose(); yield mlirContext.activate(outputChannel); }))); // registerMLIRExtensions(context, mlirContext); // registerPDLLExtensions(context, mlirContext); mlirContext.activate(outputChannel); } exports.activate = activate; //# sourceMappingURL=extension.js.map