* @returns {string} rendered literal source
()
| 34 | * @returns {string} rendered literal source |
| 35 | */ |
| 36 | renderLiteral() { |
| 37 | switch (this.kind) { |
| 38 | case "null": |
| 39 | return "null"; |
| 40 | case "undefined": |
| 41 | return "undefined"; |
| 42 | case "boolean": |
| 43 | return this.value ? "true" : "false"; |
| 44 | case "number": |
| 45 | return String(this.value); |
| 46 | case "string": |
| 47 | return JSON.stringify(this.value); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * @param {string} comment leading comment text |