export default abstract class CodeElement { abstract getCode ( ) ; protected encode ( src ) { return src . replace ( /\\/g , '\\\\' ) . replace ( /'/g , "\\'" ) ; } protected indent ( src ) { return src . split ( '\n' ) . map ( line => ( line == '' ? '' : '    ' + line + '\n' ) ) . join ( '' ) ; } }