(value: string)
| 1445 | } |
| 1446 | |
| 1447 | function toEnumMemberName(value: string): string { |
| 1448 | const cleaned = value |
| 1449 | .replace(/([a-z])([A-Z])/g, "$1_$2") |
| 1450 | .replace(/[^A-Za-z0-9]+/g, "_") |
| 1451 | .replace(/^_+|_+$/g, "") |
| 1452 | .toUpperCase(); |
| 1453 | if (!cleaned) { |
| 1454 | return "VALUE"; |
| 1455 | } |
| 1456 | return /^[0-9]/.test(cleaned) ? `VALUE_${cleaned}` : cleaned; |
| 1457 | } |
| 1458 | |
| 1459 | function wrapParser(resolved: PyResolvedType, arg = "x"): string { |
| 1460 | return `lambda ${arg}: ${resolved.fromExpr(arg)}`; |
no outgoing calls
no test coverage detected
searching dependent graphs…