MCPcopy Create free account
hub / github.com/Effect-TS/effect / parseSequence

Method parseSequence

packages/effect/src/unstable/encoding/Yaml.ts:224–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222 }
223
224 private parseSequence(): Array<unknown> {
225 this.expect("[")
226 const output: Array<unknown> = []
227 this.skipWhitespace()
228 if (this.peek() === "]") {
229 this.index++
230 return output
231 }
232 while (true) {
233 output.push(this.parseValue())
234 this.skipWhitespace()
235 if (this.peek() === "]") {
236 this.index++
237 return output
238 }
239 this.expect(",")
240 this.skipWhitespace()
241 if (this.peek() === "]") {
242 this.index++
243 return output
244 }
245 }
246 }
247
248 private parseMapping(): YamlRecord {
249 this.expect("{")

Callers 1

parseValueMethod · 0.95

Calls 5

expectMethod · 0.95
skipWhitespaceMethod · 0.95
peekMethod · 0.95
parseValueMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected