MCPcopy Create free account
hub / github.com/angular/angular / tokenizeWithoutErrors

Function tokenizeWithoutErrors

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

Source from the content-addressed store, hash-verified

3845});
3846
3847function tokenizeWithoutErrors(input: string, options?: TokenizeOptions): TokenizeResult {
3848 const tokenizeResult = tokenize(input, 'someUrl', getHtmlTagDefinition, options);
3849
3850 if (tokenizeResult.errors.length > 0) {
3851 const errorString = tokenizeResult.errors.join('\n');
3852 throw new Error(`Unexpected parse errors:\n${errorString}`);
3853 }
3854
3855 return tokenizeResult;
3856}
3857
3858function humanizeParts(tokens: Token[]) {
3859 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