MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / isIdentifier

Function isIdentifier

src/Chain/libraries/glua/glua_decompile.cpp:1583–1604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1581};
1582
1583int isIdentifier(std::string src) {
1584 int dot = 0;
1585 if (luadec_isalpha(src[0]) || src[0] == '_') {
1586 int i;
1587 const char *at;
1588 int len = (int)src.length();
1589 dot = 1;
1590 for (at = src.c_str() + 1; at < src.c_str() + len; at++) {
1591 if (!(luadec_isalnum(*at) || *at == '_')) {
1592 dot = 0;
1593 break;
1594 }
1595 }
1596 for (i = 0; i < numofkeywords; i++) {
1597 if (strcmp(keywords[i], src.c_str()) == 0) {
1598 dot = 0;
1599 break;
1600 }
1601 }
1602 }
1603 return dot;
1604}
1605
1606/*
1607** type: DOT, SELF, TABLE, SQUARE_BRACKET

Callers 4

FixLocalNamesFunction · 0.85
MakeIndexFunction · 0.85
ProcessCodeFunction · 0.85
ProcessSubFunctionFunction · 0.85

Calls 4

luadec_isalphaFunction · 0.85
luadec_isalnumFunction · 0.85
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected