MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / LexisIsIdentifier

Function LexisIsIdentifier

internal/lexis.cc:63–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63bool 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

Callers 8

ValidateTypeFunction · 0.85
CreateMethod · 0.85
MakeMethod · 0.85
IsValidRelativeNameFunction · 0.85
ParseIdentifierFunction · 0.85
TEST_PFunction · 0.85
IsValidQualifiedNameFunction · 0.85
IsValidAliasFunction · 0.85

Calls 3

LexisIsReservedFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by 1

TEST_PFunction · 0.68