MCPcopy Create free account
hub / github.com/JordanCoin/codemap / isValidIdentifier

Function isValidIdentifier

scanner/astgrep.go:571–587  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

569}
570
571func 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
590type AstGrepAnalyzer = AstGrepScanner

Callers 1

extractFunctionNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected