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

Function getTouchingToken

test/fixtures/snapshot/typescript.js:127409–127411  ·  view source on GitHub ↗

* Returns the token if position is in [start, end). * If position === end, returns the preceding token if includeItemAtEndPosition(previousToken) === true

(sourceFile, position, includePrecedingTokenAtEndPosition)

Source from the content-addressed store, hash-verified

127407 * If position === end, returns the preceding token if includeItemAtEndPosition(previousToken) === true
127408 */
127409 function getTouchingToken(sourceFile, position, includePrecedingTokenAtEndPosition) {
127410 return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includePrecedingTokenAtEndPosition, /*includeEndPosition*/ false);
127411 }
127412 ts.getTouchingToken = getTouchingToken;
127413 /** Returns a token if position is in [start-of-leading-trivia, end) */
127414 function getTokenAtPosition(sourceFile, position) {

Callers 1

getTouchingPropertyNameFunction · 0.85

Calls 1

getTokenAtPositionWorkerFunction · 0.85

Tested by

no test coverage detected