import { LineResults } from "../LineResults" ; import { CommandNames } from "../Names/CommandNames" ; import { Command } from "./Command" ; import { CommandResult } from "./CommandResult" ; import { CommandMetadata } from "./Metadata/CommandMetadata" ; import { addLineEnder } from "./Utilities" ; /**
 * Starts a try block.
 */ export class TryStartCommand extends Command { /**
     * Metadata on the command.
     */ private static metadata : CommandMetadata = new CommandMetadata ( CommandNames . TryStart ) . withDescription ( "Starts a try block" ) . withIndentation ( [ 1 ] ) ; returns public getMetadata ( ) { return TryStartCommand . metadata ; } param parameters returns public render ( parameters ) { const line = this . language . syntax . exceptions . try ; const lines = [ new CommandResult ( line , 0 ) ] ; addLineEnder ( lines , this . language . syntax . exceptions . tryStartRight , 1 ) ; return new LineResults ( lines ) ; } }