Repl command that uses the FlowrAnalyzer

interface ReplCodeCommand {
    aliases: string[];
    argsParser: (
        remainingLine: string,
    ) => { input: string; remaining: string[] };
    description: string;
    fn: (info: ReplCodeCommandInformation) => void | Promise<void>;
    script: boolean;
    usageExample: string;
    usesAnalyzer: true;
}

Hierarchy (View Summary)

Hierarchy-Diagram

UML class diagram of ReplCodeCommand

Properties

aliases: string[]

Aliases of the command (without the leading colon), every alias must be unique (this is checked at runtime)

argsParser: (remainingLine: string) => { input: string; remaining: string[] }

Argument parser function which handles the input given after the repl command

description: string

A human-readable description of what the command does

fn: (info: ReplCodeCommandInformation) => void | Promise<void>

Function to execute when the command is invoked, it must not write to the command line but instead use the output handler. Furthermore, it has to obey the formatter defined in the ReplOutput.

script: boolean

Does the command invoke another script? this is mainly used to automatically generate two separate lists when asking for help

usageExample: string

Example of how to use the command, for example :slicer --help

usesAnalyzer: true