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

Function parseItem

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

Source from the content-addressed store, hash-verified

702 * ```
703 */
704export function parseItem(input: string): Item {
705 const state: ParserState = { input, pos: 0 };
706 skipSP(state);
707 const item = parseItemInternal(state);
708 skipSP(state);
709 if (!isEof(state)) {
710 throw new SyntaxError(
711 `Invalid structured field: unexpected character at position ${state.pos}`,
712 );
713 }
714 return item;
715}
716
717function parseItemOrInnerList(state: ParserState): Item | InnerList {
718 if (peek(state) === "(") {

Callers 3

fnFunction · 0.90
runConformanceTestsFunction · 0.90

Calls 3

skipSPFunction · 0.85
parseItemInternalFunction · 0.85
isEofFunction · 0.85

Tested by

no test coverage detected