MCPcopy Create free account
hub / github.com/nodejs/node / getTemplateLiteralRawText

Function getTemplateLiteralRawText

test/fixtures/snapshot/typescript.js:33244–33248  ·  view source on GitHub ↗
(kind)

Source from the content-addressed store, hash-verified

33242 return fragment;
33243 }
33244 function getTemplateLiteralRawText(kind) {
33245 var isLast = kind === 14 /* SyntaxKind.NoSubstitutionTemplateLiteral */ || kind === 17 /* SyntaxKind.TemplateTail */;
33246 var tokenText = scanner.getTokenText();
33247 return tokenText.substring(1, tokenText.length - (scanner.isUnterminated() ? 0 : isLast ? 1 : 2));
33248 }
33249 function parseLiteralLikeNode(kind) {
33250 var pos = getNodePos();
33251 var node = ts.isTemplateLiteralKind(kind) ? factory.createTemplateLiteralLikeNode(kind, scanner.getTokenValue(), getTemplateLiteralRawText(kind), scanner.getTokenFlags() & 2048 /* TokenFlags.TemplateLiteralLikeFlags */) :

Callers 1

parseLiteralLikeNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected