Content of a PHP string literal node (single- or double-quoted).
(node: SyntaxNode, source: string)
| 861 | |
| 862 | /** Content of a PHP string literal node (single- or double-quoted). */ |
| 863 | function phpStringContent(node: SyntaxNode, source: string): string | null { |
| 864 | for (const child of namedChildrenOf(node)) { |
| 865 | if (child?.type === 'string_content') return getNodeText(child, source).trim(); |
| 866 | } |
| 867 | return null; |
| 868 | } |
| 869 | |
| 870 | /** The function name of the PHP call whose arguments contain `node`, if any. */ |
| 871 | function phpEnclosingCallName(node: SyntaxNode): string | null { |
no test coverage detected