(node, scope)
| 1431 | * @param {Scope} scope |
| 1432 | */ |
| 1433 | export function get_rune(node, scope) { |
| 1434 | if (!node) return null; |
| 1435 | if (node.type !== 'CallExpression') return null; |
| 1436 | |
| 1437 | const keypath = get_global_keypath(node.callee, scope); |
| 1438 | |
| 1439 | if (!keypath || !is_rune(keypath)) return null; |
| 1440 | return keypath; |
| 1441 | } |
| 1442 | |
| 1443 | /** |
| 1444 | * Returns the name of the rune if the given expression is a `CallExpression` using a rune. |
no test coverage detected