Remove tail command stub
This commit is contained in:
@@ -43,7 +43,6 @@ import {Each} from "./each.js";
|
|||||||
import {Words} from "./words.js";
|
import {Words} from "./words.js";
|
||||||
import {Drop} from "./drop.js";
|
import {Drop} from "./drop.js";
|
||||||
import {Sort} from "./sort.js";
|
import {Sort} from "./sort.js";
|
||||||
import {Tail} from "./tail.js";
|
|
||||||
|
|
||||||
export type Commands = Command<CommandData>[]
|
export type Commands = Command<CommandData>[]
|
||||||
export const commands: Commands = [
|
export const commands: Commands = [
|
||||||
@@ -83,7 +82,6 @@ export const commands: Commands = [
|
|||||||
new Sort,
|
new Sort,
|
||||||
new Split,
|
new Split,
|
||||||
new Suffix,
|
new Suffix,
|
||||||
new Tail,
|
|
||||||
new To,
|
new To,
|
||||||
new Trim,
|
new Trim,
|
||||||
new Undo,
|
new Undo,
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
import {Command, ParseContext, StrTerm} from "./command.js";
|
|
||||||
import {LexInput} from "../lexer.js";
|
|
||||||
import {StrVM} from "../vm.js";
|
|
||||||
import {Lines} from "./lines.js";
|
|
||||||
import {Words} from "./words.js";
|
|
||||||
import {Join} from "./join.js";
|
|
||||||
import {Awaitable} from "../../util/types.js";
|
|
||||||
|
|
||||||
export type TailData = {
|
|
||||||
length?: StrTerm,
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Tail extends Command<TailData> {
|
|
||||||
attemptParse(context: ParseContext): Awaitable<TailData> {
|
|
||||||
return {
|
|
||||||
length: context.popOptionalTerm(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getDisplayName(): string {
|
|
||||||
return 'tail'
|
|
||||||
}
|
|
||||||
|
|
||||||
isParseCandidate(token: LexInput): boolean {
|
|
||||||
return this.isKeyword(token, 'tail')
|
|
||||||
}
|
|
||||||
|
|
||||||
async execute(vm: StrVM, data: TailData): Promise<StrVM> {
|
|
||||||
return vm
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user