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

Function parseDictionary

http/unstable_structured_fields.ts:630–641  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

628 * ```
629 */
630export function parseDictionary(input: string): Dictionary {
631 const state: ParserState = { input, pos: 0 };
632 skipSP(state);
633 const dict = parseDictionaryInternal(state);
634 skipSP(state);
635 if (!isEof(state)) {
636 throw new SyntaxError(
637 `Invalid structured field: unexpected character at position ${state.pos}`,
638 );
639 }
640 return dict;
641}
642
643function parseDictionaryInternal(state: ParserState): Dictionary {
644 const dict: Map<string, Item | InnerList> = new Map();

Callers 6

resolveDictionaryMemberFunction · 0.90
assertUniqueLabelFunction · 0.90
verifyMessageFunction · 0.90
fnFunction · 0.90
runConformanceTestsFunction · 0.90

Calls 3

skipSPFunction · 0.85
parseDictionaryInternalFunction · 0.85
isEofFunction · 0.85

Tested by

no test coverage detected