MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / cfmlVisibility

Function cfmlVisibility

src/extraction/languages/cfscript.ts:6–18  ·  view source on GitHub ↗

CFML access modifiers (`public`/`private`/`package`/`remote`) on a function_declaration.

(node: SyntaxNode)

Source from the content-addressed store, hash-verified

4
5/** CFML access modifiers (`public`/`private`/`package`/`remote`) on a function_declaration. */
6function cfmlVisibility(node: SyntaxNode): 'public' | 'private' | 'protected' | 'internal' | undefined {
7 for (let i = 0; i < node.childCount; i++) {
8 const child = node.child(i);
9 if (child?.type === 'access_type') {
10 const text = child.text;
11 if (text === 'public') return 'public';
12 if (text === 'private') return 'private';
13 if (text === 'package') return 'internal';
14 if (text === 'remote') return 'public';
15 }
16 }
17 return undefined;
18}
19
20/**
21 * A string literal's text when it is written out in full, or null when a

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected