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

Function createNode

test/fixtures/snapshot/typescript.js:163910–163918  ·  view source on GitHub ↗
(kind, pos, end, parent)

Source from the content-addressed store, hash-verified

163908 /** The version of the language service API */
163909 ts.servicesVersion = "0.8";
163910 function createNode(kind, pos, end, parent) {
163911 var node = ts.isNodeKind(kind) ? new NodeObject(kind, pos, end) :
163912 kind === 79 /* SyntaxKind.Identifier */ ? new IdentifierObject(79 /* SyntaxKind.Identifier */, pos, end) :
163913 kind === 80 /* SyntaxKind.PrivateIdentifier */ ? new PrivateIdentifierObject(80 /* SyntaxKind.PrivateIdentifier */, pos, end) :
163914 new TokenObject(kind, pos, end);
163915 node.parent = parent;
163916 node.flags = parent.flags & 50720768 /* NodeFlags.ContextFlags */;
163917 return node;
163918 }
163919 var NodeObject = /** @class */ (function () {
163920 function NodeObject(kind, pos, end) {
163921 this.pos = pos;

Callers 2

addSyntheticNodesFunction · 0.70
createSyntaxListFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected