/**
 * Used for commenting labels (addresses) in the disassembly.
 */ export class Comment { public linesBefore : Array < string > ; public inlineComment : string ; public linesAfter : Array < string > ; public addBefore ( line ) { if ( ! this . linesBefore ) this . linesBefore = Array < string > ( ) ; this . linesBefore . push ( line ) ; } public addAfter ( line ) { if ( ! this . linesAfter ) this . linesAfter = Array < string > ( ) ; this . linesAfter . push ( line ) ; } param comment param statement param disableComments returns public static getLines ( comment , statement , disableComments ) { if ( ! disableComments && comment ) { const arr = new Array < string > ( ) ; if ( comment . linesBefore ) arr . push ( ... comment . linesBefore ) ; let text = statement ; if ( comment . inlineComment ) text += '\t' + comment . inlineComment ; arr . push ( text ) ; if ( comment . linesAfter ) arr . push ( ... comment . linesAfter ) ; return arr ; } else { return [ statement ] ; } } }