import { LineResults } from "../LineResults" ; import { CommandNames } from "../Names/CommandNames" ; import { Command } from "./Command" ; import { CommandMetadata } from "./Metadata/CommandMetadata" ; /**
 * Ends an enum declaration.
 */ export class EnumEndCommand extends Command { /**
     * Metadata on the command.
     */ private static metadata : CommandMetadata = new CommandMetadata ( CommandNames . EnumEnd ) . withDescription ( "Ends an enum declaration" ) . withIndentation ( [ - 1 ] ) ; returns public getMetadata ( ) { return EnumEndCommand . metadata ; } param parameters returns public render ( parameters ) { const ender = this . renderEnumEnd ( ) ; if ( ender === "\0" ) { return LineResults . newBlockLine ( "\0" , - 1 ) ; } return LineResults . newBlockLine ( ender , - 1 ) ; } returns protected renderEnumEnd ( ) { if ( this . language . syntax . enums . isObject ) { return this . language . syntax . conditionals . end + ";" ; } return this . language . syntax . conditionals . end ; } }