New calling conventions, start on print.cpp
This commit is contained in:
@@ -16,6 +16,25 @@
|
||||
|
||||
namespace util {
|
||||
|
||||
static bool ascii_isalpha(char c) {
|
||||
return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z'));
|
||||
}
|
||||
|
||||
static bool ascii_isdigit(char c) {
|
||||
return ((c >= '0') && (c <= '9'));
|
||||
}
|
||||
|
||||
bool is_identifier(const std::string &str) {
|
||||
if (str.size() == 0) return false;
|
||||
char c=str[0];
|
||||
if ((!ascii_isalpha(c)) && (c!='_')) return false;
|
||||
for (int i = 1; i < int(str.size()); i++) {
|
||||
char c = str[i];
|
||||
if ((!ascii_isalpha(c)) && (!ascii_isdigit(c)) && (c!='_')) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
IdVector id_vector_create(int64_t id1, int64_t id2, int64_t id3, int64_t id4) {
|
||||
IdVector result;
|
||||
if (id1 >= 0) result.push_back(id1);
|
||||
|
||||
Reference in New Issue
Block a user