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

Function tokenizeWithoutErrors

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

Source from the content-addressed store, hash-verified

3862});
3863
3864function tokenizeWithoutErrors(input: string, options?: TokenizeOptions): TokenizeResult {
3865 const tokenizeResult = tokenize(input, 'someUrl', getHtmlTagDefinition, options);
3866
3867 if (tokenizeResult.errors.length > 0) {
3868 const errorString = tokenizeResult.errors.join('\n');
3869 throw new Error(`Unexpected parse errors:\n${errorString}`);
3870 }
3871
3872 return tokenizeResult;
3873}
3874
3875function humanizeParts(tokens: Token[]) {
3876 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