(path)
| 323 | return path; |
| 324 | } |
| 325 | readFileJSON(path) { |
| 326 | let buffer = this.readFileString(path); |
| 327 | try { |
| 328 | return JSON.parse(buffer); |
| 329 | } |
| 330 | catch (e) { |
| 331 | let message = e.toString(); |
| 332 | let result = /SyntaxError: ([^:]+: )?([0-9]+): (.+)/.exec(message); |
| 333 | if (result.length == 4) { |
| 334 | this.reportError(path, parseInt(result[2]), result[3]); |
| 335 | } |
| 336 | throw e; |
| 337 | } |
| 338 | } |
| 339 | writeDirectoryFileString(path, name, string) { |
| 340 | let segments = name.split('/'); |
| 341 | if (segments.length > 1) |
no test coverage detected