* Helper to check if an expression is a property access
(
item: import("./AST.js").ReturnItem,
)
| 2581 | * Helper to check if an expression is a property access |
| 2582 | */ |
| 2583 | function isPropertyAccessExpression( |
| 2584 | item: import("./AST.js").ReturnItem, |
| 2585 | ): { variable: string; property: string } | null { |
| 2586 | if (item.variable && item.property) { |
| 2587 | return { variable: item.variable, property: item.property }; |
| 2588 | } |
| 2589 | const expr = item.expression; |
| 2590 | if (expr && typeof expr === "object" && "type" in expr) { |
| 2591 | if (expr.type === "PropertyAccess") { |
| 2592 | const prop = expr as import("./AST.js").PropertyAccess; |
| 2593 | return { variable: prop.variable, property: prop.property }; |
| 2594 | } |
| 2595 | } |
| 2596 | return null; |
| 2597 | } |
| 2598 | |
| 2599 | /** |
| 2600 | * Convert RETURN clause to appropriate steps. |
no outgoing calls
no test coverage detected