The literal template `cfinclude(template="x.cfm")` or `cfinclude("x.cfm")` names.
(node: SyntaxNode, source: string)
| 47 | |
| 48 | /** The literal template `cfinclude(template="x.cfm")` or `cfinclude("x.cfm")` names. */ |
| 49 | function cfIncludeCallTemplate(node: SyntaxNode, source: string): string | null { |
| 50 | const args = getChildByField(node, 'arguments'); |
| 51 | if (!args) return null; |
| 52 | for (const arg of args.namedChildren) { |
| 53 | const named = templateArgument(arg, source); |
| 54 | if (named) return named; |
| 55 | } |
| 56 | return literalString(args.namedChildren[0], source); |
| 57 | } |
| 58 | |
| 59 | /** A component name or dotted component path (`Batch`, `contenscms.core.queue.Batch`). */ |
| 60 | const COMPONENT_PATH = /^[A-Za-z_][\w$-]*(?:\.[A-Za-z_][\w$-]*)*$/; |
no test coverage detected