MCPcopy Index your code
hub / github.com/angular/angular / parseStyleNext

Function parseStyleNext

packages/core/src/render3/styling/styling_parser.ts:144–156  ·  view source on GitHub ↗
(text: string, startIndex: number)

Source from the content-addressed store, hash-verified

142 * @returns index where the next invocation of `parseStyleNext` should resume.
143 */
144export function parseStyleNext(text: string, startIndex: number): number {
145 const end = parserState.textEnd;
146 let index = (parserState.key = consumeWhitespace(text, startIndex, end));
147 if (end === index) {
148 // we reached an end so just quit
149 return -1;
150 }
151 index = parserState.keyEnd = consumeStyleKey(text, index, end);
152 index = consumeSeparator(text, index, end, CharCode.COLON);
153 index = parserState.value = consumeWhitespace(text, index, end);
154 index = parserState.valueEnd = consumeStyleValue(text, index, end);
155 return consumeSeparator(text, index, end, CharCode.SEMI_COLON);
156}
157
158/**
159 * Reset the global state of the styling parser.

Callers 2

styleStringParserFunction · 0.90
parseStyleFunction · 0.85

Calls 4

consumeWhitespaceFunction · 0.85
consumeStyleKeyFunction · 0.85
consumeSeparatorFunction · 0.85
consumeStyleValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…