CFML access modifiers (`public`/`private`/`package`/`remote`) on a function_declaration.
(node: SyntaxNode)
| 4 | |
| 5 | /** CFML access modifiers (`public`/`private`/`package`/`remote`) on a function_declaration. */ |
| 6 | function 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 |
nothing calls this directly
no outgoing calls
no test coverage detected