(x: string)
| 144 | return '!n'; |
| 145 | } |
| 146 | static string(x: string) { |
| 147 | if (x === '') return "''"; |
| 148 | |
| 149 | if (id_ok.test(x)) return x; |
| 150 | |
| 151 | x = x.replace(/(['!])/g, (a, b) => { |
| 152 | if (string_table[b as keyof typeof string_table]) return '!' + b; |
| 153 | return b; |
| 154 | }); |
| 155 | return "'" + x + "'"; |
| 156 | } |
| 157 | static undefined() { |
| 158 | // ignore undefined just like JSON |
| 159 | return undefined; |
no test coverage detected