(value: string, fallback: string)
| 99 | } |
| 100 | |
| 101 | function toRustPascalIdentifier(value: string, fallback: string): string { |
| 102 | let identifier = toPascalCase(value); |
| 103 | if (!identifier) { |
| 104 | identifier = fallback; |
| 105 | } else if (!/^[A-Za-z_]/.test(identifier)) { |
| 106 | identifier = `${fallback}${identifier}`; |
| 107 | } |
| 108 | |
| 109 | return RUST_KEYWORDS.has(identifier) ? `${identifier}Value` : identifier; |
| 110 | } |
| 111 | |
| 112 | function uniqueRustPascalIdentifier( |
| 113 | value: string, |
no test coverage detected
searching dependent graphs…