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

Function tokenizeWithoutErrors

packages/compiler/test/ml_parser/lexer_spec.ts:3801–3810  ·  view source on GitHub ↗
(input: string, options?: TokenizeOptions)

Source from the content-addressed store, hash-verified

3799});
3800
3801function tokenizeWithoutErrors(input: string, options?: TokenizeOptions): TokenizeResult {
3802 const tokenizeResult = tokenize(input, 'someUrl', getHtmlTagDefinition, options);
3803
3804 if (tokenizeResult.errors.length > 0) {
3805 const errorString = tokenizeResult.errors.join('\n');
3806 throw new Error(`Unexpected parse errors:\n${errorString}`);
3807 }
3808
3809 return tokenizeResult;
3810}
3811
3812function humanizeParts(tokens: Token[]) {
3813 return tokens.map((token) => [token.type, ...token.parts]);

Callers 5

lexer_spec.tsFile · 0.85
tokenizeAndHumanizePartsFunction · 0.85

Calls 2

tokenizeFunction · 0.90
joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…