MCPcopy Index your code
hub / github.com/nodejs/node / isReusableStatement

Function isReusableStatement

test/fixtures/snapshot/typescript.js:32921–32957  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

32919 return false;
32920 }
32921 function isReusableStatement(node) {
32922 if (node) {
32923 switch (node.kind) {
32924 case 256 /* SyntaxKind.FunctionDeclaration */:
32925 case 237 /* SyntaxKind.VariableStatement */:
32926 case 235 /* SyntaxKind.Block */:
32927 case 239 /* SyntaxKind.IfStatement */:
32928 case 238 /* SyntaxKind.ExpressionStatement */:
32929 case 251 /* SyntaxKind.ThrowStatement */:
32930 case 247 /* SyntaxKind.ReturnStatement */:
32931 case 249 /* SyntaxKind.SwitchStatement */:
32932 case 246 /* SyntaxKind.BreakStatement */:
32933 case 245 /* SyntaxKind.ContinueStatement */:
32934 case 243 /* SyntaxKind.ForInStatement */:
32935 case 244 /* SyntaxKind.ForOfStatement */:
32936 case 242 /* SyntaxKind.ForStatement */:
32937 case 241 /* SyntaxKind.WhileStatement */:
32938 case 248 /* SyntaxKind.WithStatement */:
32939 case 236 /* SyntaxKind.EmptyStatement */:
32940 case 252 /* SyntaxKind.TryStatement */:
32941 case 250 /* SyntaxKind.LabeledStatement */:
32942 case 240 /* SyntaxKind.DoStatement */:
32943 case 253 /* SyntaxKind.DebuggerStatement */:
32944 case 266 /* SyntaxKind.ImportDeclaration */:
32945 case 265 /* SyntaxKind.ImportEqualsDeclaration */:
32946 case 272 /* SyntaxKind.ExportDeclaration */:
32947 case 271 /* SyntaxKind.ExportAssignment */:
32948 case 261 /* SyntaxKind.ModuleDeclaration */:
32949 case 257 /* SyntaxKind.ClassDeclaration */:
32950 case 258 /* SyntaxKind.InterfaceDeclaration */:
32951 case 260 /* SyntaxKind.EnumDeclaration */:
32952 case 259 /* SyntaxKind.TypeAliasDeclaration */:
32953 return true;
32954 }
32955 }
32956 return false;
32957 }
32958 function isReusableEnumMember(node) {
32959 return node.kind === 299 /* SyntaxKind.EnumMember */;
32960 }

Callers 1

canReuseNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected