(s string)
| 569 | } |
| 570 | |
| 571 | func isValidIdentifier(s string) bool { |
| 572 | if s == "" { |
| 573 | return false |
| 574 | } |
| 575 | for i, c := range s { |
| 576 | if i == 0 { |
| 577 | if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_') { |
| 578 | return false |
| 579 | } |
| 580 | } else { |
| 581 | if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_') { |
| 582 | return false |
| 583 | } |
| 584 | } |
| 585 | } |
| 586 | return true |
| 587 | } |
| 588 | |
| 589 | // Legacy exports for compatibility |
| 590 | type AstGrepAnalyzer = AstGrepScanner |
no outgoing calls
no test coverage detected