()
| 98 | } |
| 99 | |
| 100 | function parseArr(): ParseArrayOutput { |
| 101 | const nodeStart = start; |
| 102 | const values = []; |
| 103 | expect('['); |
| 104 | if (!skip(']')) { |
| 105 | do { |
| 106 | values.push(parseVal()); |
| 107 | } while (skip(',')); |
| 108 | expect(']'); |
| 109 | } |
| 110 | return { |
| 111 | kind: 'Array', |
| 112 | start: nodeStart, |
| 113 | end: lastEnd, |
| 114 | values, |
| 115 | }; |
| 116 | } |
| 117 | |
| 118 | function parseVal(): ParseValueOutput | undefined { |
| 119 | switch (kind) { |