UNPKG

@nebulaglitch/shopbot

Version:
33 lines (28 loc) 1.07 kB
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const code = require('./code.cjs'); const command = require('./command.cjs'); const label = require('./label.cjs'); const variable = require('./variable.cjs'); class ShopbotPrinter { static print(arr, sb = '') { arr.forEach((current)=>{ if (current instanceof code.default) { sb += current.toString(); } else if (current instanceof command.default) { sb += current.toString(); } else if (current instanceof label.default) { sb += current.toString(); } else if (current instanceof variable.default) { sb += current.toString(); } else if (current instanceof Array) { sb += '\n'; sb = ShopbotPrinter.print(current, sb); } sb += '\n'; }); return sb; } } exports.default = ShopbotPrinter; //# sourceMappingURL=shopbotprinter.cjs.map