()
| 83 | } |
| 84 | |
| 85 | skipWhitespaces() { |
| 86 | while (this.#whitespace.test(this.char()) && !this.eof()) { |
| 87 | this.next(); |
| 88 | } |
| 89 | // Invalid if current char is other kinds of whitespace |
| 90 | if (!this.isCurrentCharEOL() && /\s/.test(this.char())) { |
| 91 | const escaped = "\\u" + this.char().charCodeAt(0).toString(16); |
| 92 | const position = this.#position; |
| 93 | throw new SyntaxError( |
| 94 | `Cannot parse the TOML: It contains invalid whitespace at position '${position}': \`${escaped}\``, |
| 95 | ); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | nextUntilChar(options: { skipComments?: boolean } = { skipComments: true }) { |
| 100 | while (!this.eof()) { |
no test coverage detected