| 61 | } |
| 62 | |
| 63 | bool LexisIsIdentifier(absl::string_view text) { |
| 64 | if (text.empty()) { |
| 65 | return false; |
| 66 | } |
| 67 | char first = text.front(); |
| 68 | if (!absl::ascii_isalpha(first) && first != '_') { |
| 69 | return false; |
| 70 | } |
| 71 | for (size_t index = 1; index < text.size(); index++) { |
| 72 | if (!absl::ascii_isalnum(text[index]) && text[index] != '_') { |
| 73 | return false; |
| 74 | } |
| 75 | } |
| 76 | return !LexisIsReserved(text); |
| 77 | } |
| 78 | |
| 79 | } // namespace cel::internal |