(func: Func)
| 1193 | } |
| 1194 | |
| 1195 | function extractComparisonField(func: Func): ComparisonField | null { |
| 1196 | // Handle comparison operators: eq, gt, gte, lt, lte |
| 1197 | if ([`eq`, `gt`, `gte`, `lt`, `lte`].includes(func.name)) { |
| 1198 | // Assume first arg is ref, second is value |
| 1199 | const firstArg = func.args[0] |
| 1200 | const secondArg = func.args[1] |
| 1201 | |
| 1202 | if (firstArg?.type === `ref` && secondArg?.type === `val`) { |
| 1203 | return { |
| 1204 | ref: firstArg, |
| 1205 | value: secondArg.value, |
| 1206 | } |
| 1207 | } |
| 1208 | } |
| 1209 | |
| 1210 | return null |
| 1211 | } |
| 1212 | |
| 1213 | function extractEqualityField(func: Func): ComparisonField | null { |
| 1214 | if (func.name === `eq`) { |
no outgoing calls
no test coverage detected