* Helper to check if an expression is a plain variable reference
(item: import("./AST.js").ReturnItem)
| 2565 | * Helper to check if an expression is a plain variable reference |
| 2566 | */ |
| 2567 | function isPlainVariableExpression(item: import("./AST.js").ReturnItem): string | null { |
| 2568 | if (item.variable && !item.property && !item.function && !item.aggregate) { |
| 2569 | return item.variable; |
| 2570 | } |
| 2571 | const expr = item.expression; |
| 2572 | if (expr && typeof expr === "object" && "type" in expr) { |
| 2573 | if (expr.type === "VariableRef") { |
| 2574 | return (expr as import("./AST.js").VariableRef).variable; |
| 2575 | } |
| 2576 | } |
| 2577 | return null; |
| 2578 | } |
| 2579 | |
| 2580 | /** |
| 2581 | * Helper to check if an expression is a property access |
no outgoing calls
no test coverage detected