MCPcopy Create free account
hub / github.com/denoland/std / skipWhitespaces

Method skipWhitespaces

toml/_parser.ts:85–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()) {

Callers 15

fnFunction · 0.95
characterFunction · 0.45
bareKeyFunction · 0.45
basicStringFunction · 0.45
literalStringFunction · 0.45
multilineBasicStringFunction · 0.45
multilineLiteralStringFunction · 0.45
booleanFunction · 0.45
infinityFunction · 0.45
nanFunction · 0.45
binaryFunction · 0.45
octalFunction · 0.45

Calls 5

charMethod · 0.95
eofMethod · 0.95
nextMethod · 0.95
isCurrentCharEOLMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected