import { Language } from "../Languages/Language" ; import { LineResults } from "../LineResults" ; import { CommandNames } from "../Names/CommandNames" ; import { Command } from "./Command" ; import { CommandMetadata } from "./Metadata/CommandMetadata" ; import { RepeatingParameters } from "./Metadata/Parameters/RepeatingParameters" ; import { SingleParameter } from "./Metadata/Parameters/SingleParameter" ; /**
 * A single-line comment.
 */ export class CommentLineCommand extends Command { /**
     * Metadata on the command.
     */ private static metadata : CommandMetadata = new CommandMetadata ( CommandNames . CommentLine ) . withDescription ( "A single-line comment" ) . withParameters ( [ new RepeatingParameters ( "Contents of the comment line" , [ new SingleParameter ( "word" , "A word in the line." , false ) ] ) , ] ) ; returns public getMetadata ( ) { return CommentLineCommand . metadata ; } param parameters returns public render ( parameters ) { const language = this . language ; let output = "" ; output += language . syntax . comments . lineLeft ; output += parameters . slice ( 1 ) . join ( " " ) ; output += language . syntax . comments . lineRight ; return LineResults . newSingleLine ( output ) ; } }