[reword]
This commit is contained in:
@@ -4,9 +4,9 @@ import { bfVisitor } from './generated/bfVisitor';
|
||||
import { DiagnosticSeverity } from 'vscode-languageclient';
|
||||
import { getTree } from './BranFlakesParseRunner';
|
||||
import { RuleNode } from 'antlr4ts/tree/RuleNode';
|
||||
import InputStrategy from './input/InputStrategy';
|
||||
import type InputStrategy from './input/InputStrategy';
|
||||
|
||||
export default class BranFlakesExecutorVisitor
|
||||
export class BranFlakesExecutorVisitor
|
||||
extends AbstractParseTreeVisitor<Promise<void>>
|
||||
implements bfVisitor<Promise<void>>
|
||||
{
|
||||
|
4
client/src/command/BranFlakesCommand.ts
Normal file
4
client/src/command/BranFlakesCommand.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface BranFlakesCommand {
|
||||
getCommandName(): string;
|
||||
getCommandHandler(): (...args: any) => Promise<any>;
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
|
||||
export interface Command{
|
||||
getCommandName():string;
|
||||
getCommandHandler():(...args:any)=>Promise<any>;
|
||||
}
|
@@ -1,7 +1,6 @@
|
||||
import { window } from 'vscode';
|
||||
import { Command as BranFlakesCommand } from './Command';
|
||||
import type { BranFlakesCommand } from './BranFlakesCommand';
|
||||
import { VSCodePromptInputStrategy } from '../input/VSCodePromptInputStrategy';
|
||||
import BranFlakesExecutorVisitor from '../BranFlakesExecutorVisitor';
|
||||
|
||||
export class CompileBranFlakesCommand implements BranFlakesCommand {
|
||||
getCommandName() {
|
||||
@@ -14,6 +13,10 @@ export class CompileBranFlakesCommand implements BranFlakesCommand {
|
||||
const inputStrategy = new VSCodePromptInputStrategy(
|
||||
window.showInputBox
|
||||
);
|
||||
const { BranFlakesExecutorVisitor } = await import(
|
||||
'../BranFlakesExecutorVisitor'
|
||||
);
|
||||
|
||||
const output = await BranFlakesExecutorVisitor.run(
|
||||
text,
|
||||
fn,
|
@@ -4,14 +4,15 @@
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
import * as path from 'path';
|
||||
import { ExtensionContext, commands, window } from 'vscode';
|
||||
import { commands } from 'vscode';
|
||||
import type { ExtensionContext } from 'vscode';
|
||||
import {
|
||||
LanguageClient,
|
||||
LanguageClientOptions,
|
||||
ServerOptions,
|
||||
TransportKind,
|
||||
} from 'vscode-languageclient';
|
||||
import { CompileBranFlakesCommand } from './command/CompileCommand';
|
||||
import { CompileBranFlakesCommand } from './command/CompileBranFlakesCommand';
|
||||
|
||||
let client: LanguageClient;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { CancellationToken, InputBoxOptions } from 'vscode';
|
||||
import InputStrategy from './InputStrategy';
|
||||
import type { CancellationToken, InputBoxOptions } from 'vscode';
|
||||
import type InputStrategy from './InputStrategy';
|
||||
|
||||
export class VSCodePromptInputStrategy implements InputStrategy {
|
||||
private inputQueue: string = '';
|
||||
|
Reference in New Issue
Block a user