* Return the code point at the current position of the parser. * Throws if the index is out of bound.
()
| 1136 | * Throws if the index is out of bound. |
| 1137 | */ |
| 1138 | private char(): number { |
| 1139 | const offset = this.position.offset |
| 1140 | if (offset >= this.message.length) { |
| 1141 | throw Error('out of bound') |
| 1142 | } |
| 1143 | const code = this.message.codePointAt(offset) |
| 1144 | if (code === undefined) { |
| 1145 | throw Error(`Offset ${offset} is at invalid UTF-16 code unit boundary`) |
| 1146 | } |
| 1147 | return code |
| 1148 | } |
| 1149 | |
| 1150 | private error( |
| 1151 | kind: ErrorKind, |
no outgoing calls
no test coverage detected